@ckeditor/ckeditor5-track-changes 31.0.0 → 31.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lang/contexts.json +8 -7
- package/lang/translations/cs.po +27 -23
- package/lang/translations/da.po +387 -0
- package/lang/translations/de.po +27 -23
- package/lang/translations/en-au.po +27 -23
- package/lang/translations/en.po +27 -23
- package/lang/translations/es.po +26 -22
- package/lang/translations/et.po +26 -22
- package/lang/translations/fr.po +27 -23
- package/lang/translations/gl.po +27 -23
- package/lang/translations/hi.po +27 -23
- package/lang/translations/hr.po +27 -23
- package/lang/translations/it.po +27 -23
- package/lang/translations/nl.po +26 -22
- package/lang/translations/pl.po +27 -23
- package/lang/translations/pt-br.po +49 -45
- package/lang/translations/sk.po +27 -23
- package/lang/translations/sr-latn.po +27 -23
- package/lang/translations/sr.po +27 -23
- package/lang/translations/tk.po +27 -23
- package/lang/translations/tr.po +27 -23
- package/lang/translations/zh-cn.po +27 -23
- package/lang/translations/zh.po +370 -0
- package/package.json +7 -7
- package/src/commands/acceptallsuggestionscommand.js +1 -1
- package/src/commands/acceptselectedsuggestionscommand.js +1 -1
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardallsuggestionscommand.js +1 -1
- package/src/commands/discardselectedsuggestionscommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.js +1 -1
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/getselectedsuggestions.js +1 -1
- package/src/utils/hashobject.js +1 -1
- package/src/utils/normalizedescription.js +1 -1
- package/src/utils/sortsuggestions.js +1 -1
- package/theme/suggestion.css +10 -0
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4d1a=['enter','mapper','requires','fromRange','isAtEnd','ck-suggestion-marker-split','isLimit','setSelection','markerName','writer','start','showSuggestionHighlights','document','editing','plugins','enableCommand','detach','high','markInsertion','downcastDispatcher','editor','nextSibling','split','model','TrackChangesEditing','createRange','remove','options','end','addMarker:suggestion:insertion','selection','schema','markerNameToElements','parent'];(function(_0x17ef46,_0x4d1ace){const _0xb67cea=function(_0x1b972f){while(--_0x1b972f){_0x17ef46['push'](_0x17ef46['shift']());}};_0xb67cea(++_0x4d1ace);}(_0x4d1a,0x6a));const _0xb67c=function(_0x17ef46,_0x4d1ace){_0x17ef46=_0x17ef46-0x0;let _0xb67cea=_0x4d1a[_0x17ef46];return _0xb67cea;};import{Plugin as _0x551321}from'ckeditor5/src/core';import{Enter as _0x15c953}from'ckeditor5/src/enter';import{LiveRange as _0x246a6f}from'ckeditor5/src/engine';import{downcastSplitMergeMarker as _0x46f7cf}from'./utils';export default class W extends _0x551321{static get[_0xb67c('0x20')](){return[_0x15c953];}['init'](){const _0x5e47e1=this[_0xb67c('0x10')],_0x4324f6=_0x5e47e1[_0xb67c('0xa')]['get'](_0xb67c('0x14'));_0x4324f6[_0xb67c('0xb')](_0xb67c('0x1e'),_0x4dba93=>{_0x5e47e1[_0xb67c('0x13')]['change'](_0xd7f085=>{const _0x1af41c=_0x5e47e1[_0xb67c('0x13')][_0xb67c('0x8')][_0xb67c('0x1a')],_0x574a6e=_0x1af41c['getFirstPosition'](),_0x53e3b7=_0x1af41c['isCollapsed'],_0x279cc0=_0x246a6f[_0xb67c('0x21')](_0x1af41c['getFirstRange']()),_0x1dac48=_0x279cc0[_0xb67c('0x6')][_0xb67c('0x1d')],_0x1c0b57=_0x279cc0[_0xb67c('0x18')][_0xb67c('0x1d')],_0x452d75=!(_0x279cc0['start']['isAtStart']&&_0x279cc0[_0xb67c('0x18')][_0xb67c('0x0')]),_0x1e9426=_0x1dac48==_0x1c0b57,_0x46fc2a=!(_0x5e47e1['model'][_0xb67c('0x1b')][_0xb67c('0x2')](_0x1dac48)||_0x5e47e1[_0xb67c('0x13')][_0xb67c('0x1b')]['isLimit'](_0x1c0b57))&&(_0x53e3b7||_0x452d75&&_0x1e9426);if(_0x4dba93(),_0x46fc2a){const _0x2ecd27=_0x5e47e1['model']['createPositionAt'](_0x574a6e[_0xb67c('0x1d')][_0xb67c('0x11')],0x0),_0x2ae64c=_0xd7f085[_0xb67c('0x15')](_0x574a6e,_0x2ecd27);_0x4324f6[_0xb67c('0xe')](_0x2ae64c);}else _0xd7f085[_0xb67c('0x3')](_0xd7f085['createRange'](_0x279cc0[_0xb67c('0x18')]));_0x279cc0[_0xb67c('0xc')]();});}),_0x5e47e1[_0xb67c('0x9')][_0xb67c('0xf')]['on']('addMarker:suggestion:insertion',_0x46f7cf(_0x5e47e1,_0xb67c('0x12')),{'priority':_0xb67c('0xd')}),_0x5e47e1[_0xb67c('0x9')][_0xb67c('0xf')]['on']('removeMarker:suggestion:insertion',(_0x4ab4b2,_0x8658f2,_0x28d7e9)=>{const _0xeb0187=_0x28d7e9['mapper'][_0xb67c('0x1c')](_0x8658f2[_0xb67c('0x4')]);if(_0xeb0187)for(const _0x41ec35 of _0xeb0187)_0x41ec35['hasClass'](_0xb67c('0x1'))&&(_0x28d7e9[_0xb67c('0x1f')]['unbindElementFromMarkerName'](_0x41ec35,_0x8658f2['markerName']),_0x28d7e9[_0xb67c('0x5')][_0xb67c('0x16')](_0x41ec35));},{'priority':_0xb67c('0xd')}),_0x5e47e1['data']['downcastDispatcher']['on'](_0xb67c('0x19'),(_0x36eaa9,_0x348ca2,_0x35d298)=>{_0x35d298[_0xb67c('0x17')][_0xb67c('0x7')]&&_0x46f7cf(_0x5e47e1,_0xb67c('0x12'),{'showActiveMarker':!0x1})(_0x36eaa9,_0x348ca2,_0x35d298);},{'priority':'high'});}}
|
package/src/integrations/font.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x2cdc36}from'ckeditor5/src/core';import{normalizeColorOptions as Ht}from'ckeditor5/src/ui';import{normalizeOptions as Jt}from'@ckeditor/ckeditor5-font/src/fontsize/utils';import{getRangesWithAttribute as Rt}from'./utils';const Xt=[{'pluginName':'FontSizeEditing','commandName':'fontSize'},{'pluginName':'FontFamilyEditing','commandName':'fontFamily'},{'pluginName':'FontColorEditing','commandName':'fontColor'},{'pluginName':'FontBackgroundColorEditing','commandName':'fontBackgroundColor'}];export default class z extends _0x2cdc36{['afterInit'](){const {t:t}=this['editor']['locale'];for(const {pluginName:_0x1561d1,commandName:_0x3c03d0}of Xt)this['editor']['plugins']['has'](_0x1561d1)&&this['_enableCommand'](_0x3c03d0);this['editor']['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['registerDescriptionCallback'](_0x33a359=>{const {data:_0x30c24d}=_0x33a359;if(null!=_0x30c24d){if('fontSize'==_0x30c24d['commandName']){const _0x55582b=_0x30c24d['commandParams'][0x0]['value'];if(_0x55582b){const _0x307d77=Jt(this['editor']['config']['get']('fontSize.options'))['find'](_0x1d11fa=>_0x1d11fa['model']==_0x55582b)['title'],_0x3d2862=this['editor']['locale']['_t'](_0x307d77)['toLowerCase']();return{'type':'format','content':t('*Set\x20font\x20size:*\x20%0',_0x3d2862)};}return{'type':'format','content':t('*Reset\x20font\x20size*')};}if('fontFamily'==_0x30c24d['commandName']){const _0x366792=_0x30c24d['commandParams'][0x0]['value'];return _0x366792?{'type':'format','content':t('*Set\x20font\x20family:*\x20%0',_0x366792)}:{'type':'format','content':t('*Reset\x20font\x20family*')};}if('fontColor'==_0x30c24d['commandName']){const _0x1eb7e3=_0x30c24d['commandParams'][0x0]['value'];if(_0x1eb7e3){const _0x268061=Ht(this['editor']['config']['get']('fontColor.colors'))['find'](_0x191d5e=>_0x191d5e['model']==_0x1eb7e3);let _0x41f567=_0x1eb7e3,_0x2b69d6='';return _0x268061&&(_0x41f567=_0x268061['label'],_0x2b69d6=this['editor']['locale']['_t'](_0x41f567)['toLowerCase']()),{'type':'format','content':t('*Set\x20font\x20color:*\x20%0',_0x2b69d6)['trim'](),'color':{'value':_0x1eb7e3,'title':_0x2b69d6||_0x41f567}};}return{'type':'format','content':t('*Reset\x20font\x20color*')};}if('fontBackgroundColor'==_0x30c24d['commandName']){const _0x5d4dbe=_0x30c24d['commandParams'][0x0]['value'];if(_0x5d4dbe){const _0x3cd75e=Ht(this['editor']['config']['get']('fontBackgroundColor.colors'))['find'](_0x3dc3db=>_0x3dc3db['model']==_0x5d4dbe);let _0x50e143=_0x5d4dbe,_0x23c8d0='';return _0x3cd75e&&(_0x50e143=_0x3cd75e['label'],_0x23c8d0=this['editor']['locale']['_t'](_0x50e143)['toLowerCase']()),{'type':'format','content':t('*Set\x20font\x20background\x20color:*\x20%0',_0x23c8d0)['trim'](),'color':{'value':_0x5d4dbe,'title':_0x23c8d0||_0x50e143}};}return{'type':'format','content':t('*Reset\x20font\x20background\x20color*')};}}});}['_enableCommand'](_0x67bf5f){const _0x26da3f=this['editor'];_0x26da3f['plugins']['get']('TrackChangesEditing')['enableCommand'](_0x67bf5f,(_0x3d153a,_0x2d7aac={})=>{const _0x2cff9e=_0x26da3f['model']['document']['selection'],_0x3efe1c=_0x2d7aac['value'];_0x2cff9e['isCollapsed']?_0x3d153a(_0x2d7aac):_0x26da3f['model']['change'](()=>{const _0x5c45ee=Array['from'](_0x2cff9e['getRanges']());for(const _0x4ea8bc of _0x5c45ee){const _0x5ee82e=_0x3efe1c?[_0x4ea8bc]:Rt(_0x67bf5f,_0x4ea8bc,_0x26da3f['model']);for(const _0x5756c2 of _0x5ee82e)_0x26da3f['plugins']['get']('TrackChangesEditing')['markInlineFormat'](_0x5756c2,{'commandName':_0x67bf5f,'commandParams':[{'value':_0x3efe1c}]});}});});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x373252}from'ckeditor5/src/core';import{getElementsAffectedByListItemRename as _0x2d6235}from'./utils';export default class J extends _0x373252{['afterInit'](){const _0x28dba7=this['editor'],{t:t}=_0x28dba7['locale'],_0x4332b4=_0x28dba7['config']['get']('heading.options');if(!_0x28dba7['plugins']['has']('HeadingEditing'))return;const _0x31c060=_0x28dba7['plugins']['get']('TrackChangesEditing');_0x31c060['enableCommand']('heading',(_0x10266f,_0x3f6712)=>{const _0x46705a=_0x3f6712['value'],_0xccf0d1=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x45d585=>function(_0x1d868a,_0x6ed4d9,_0x3d4046){return _0x3d4046['checkChild'](_0x1d868a['parent'],_0x6ed4d9)&&!_0x3d4046['isObject'](_0x1d868a)&&_0x1d868a['name']!=_0x6ed4d9;}(_0x45d585,_0x46705a,this['editor']['model']['schema']));_0x28dba7['model']['change'](()=>{for(const _0x5188a4 of _0xccf0d1)_0x31c060['markBlockFormat'](_0x5188a4,{'commandName':'heading','commandParams':[_0x3f6712],'formatGroupId':'blockName'},_0x2d6235(_0x5188a4));});});for(const _0x38485e of _0x4332b4)'paragraph'!=_0x38485e['model']&&_0x31c060['_descriptionFactory']['registerElementLabel'](_0x38485e['model'],_0x24fbe6=>{const _0x2a1780=tn(_0x38485e['model']);return null!==_0x2a1780?_0x48ae9d(_0x24fbe6,_0x2a1780):_0x276b38(_0x24fbe6,_0x38485e['title']);});function _0x48ae9d(_0x26b912,_0x275766){return t({'string':'heading\x20(level\x20%1)','plural':'%0\x20headings\x20(level\x20%1)','id':'ELEMENT_HEADING'},[_0x26b912,_0x275766]);}function _0x276b38(_0x36dc90,_0x1190bf){return t({'string':'heading\x20(%1)','plural':'%0\x20headings\x20(%1)','id':'ELEMENT_HEADING_CUSTOM'},[_0x36dc90,_0x1190bf]);}_0x31c060['_descriptionFactory']['registerDescriptionCallback'](_0x3ef0d1=>{const {type:_0x4a9e9c,data:_0x277edc}=_0x3ef0d1;if('formatBlock'==_0x4a9e9c&&_0x277edc&&'heading'==_0x277edc['commandName']){const _0x321e31=_0x277edc['commandParams'][0x0]['value'],_0x2ffe39=tn(_0x321e31);if(null!==_0x2ffe39)return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x48ae9d(0x1,_0x2ffe39))};const _0x13b0a4=_0x4332b4['find'](_0x962113=>_0x962113['model']===_0x321e31)['title'];return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x276b38(0x1,_0x13b0a4))};}});}}function tn(_0x406229){const _0x4c82e8=_0x406229['match'](/^heading(\d+)$/);return _0x4c82e8?_0x4c82e8[0x1]:null;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x1bd156}from'ckeditor5/src/core';import{getRangesWithAttribute as Rt}from'./utils';export default class K extends _0x1bd156{['afterInit'](){const _0x2bbffd=this['editor'];if(!_0x2bbffd['plugins']['has']('HighlightEditing'))return;const _0x1a7330=_0x2bbffd['plugins']['get']('TrackChangesEditing');_0x1a7330['enableCommand']('highlight',(_0xd313aa,_0x5ee2e3={})=>{const _0x273963=_0x2bbffd['model']['document']['selection'],_0x3b59a6=_0x273963['getAttribute']('highlight');let _0x62850e=_0x5ee2e3['value'],_0x64fa90=[];if(_0x273963['isCollapsed']){const _0x3e6af2=_0x273963['getFirstPosition']();if(!_0x273963['hasAttribute']('highlight'))return void _0xd313aa(_0x5ee2e3);{const _0x426ac6=_0x1d40ee=>_0x1d40ee['item']['getAttribute']('highlight')===_0x3b59a6,_0x57d17e=_0x3e6af2['getLastMatchingPosition'](_0x426ac6,{'direction':'backward'}),_0x246b2b=_0x3e6af2['getLastMatchingPosition'](_0x426ac6);_0x64fa90=[_0x2bbffd['model']['createRange'](_0x57d17e,_0x246b2b)],_0x62850e==_0x3b59a6&&(_0x62850e=null);}}else for(const _0x98538b of _0x273963['getRanges']())_0x62850e?_0x64fa90['push'](_0x98538b):_0x64fa90['push'](...Rt('highlight',_0x98538b,_0x2bbffd['model']));_0x2bbffd['model']['change'](()=>{for(const _0x151020 of _0x64fa90)_0x1a7330['markInlineFormat'](_0x151020,{'commandName':'highlight','commandParams':[{'value':_0x62850e}]});});});const {t:t}=_0x2bbffd['locale'];_0x1a7330['_descriptionFactory']['registerDescriptionCallback'](_0x3fbc81=>{const {type:_0x566c96,data:_0xa34d9f}=_0x3fbc81;if('formatInline'==_0x566c96&&_0xa34d9f&&'highlight'==_0xa34d9f['commandName']){const _0x2c0817=_0xa34d9f['commandParams'][0x0]['value'];if(_0x2c0817){const _0x1abe57=_0x2bbffd['config']['get']('highlight.options')['find'](_0x1ecd55=>_0x1ecd55['model']==_0x2c0817),_0x2b0f43=_0x2bbffd['locale']['_t'](_0x1abe57['title'])['toLowerCase']();return{'type':'format','content':t('*Set\x20highlight:*\x20%0',_0x2b0f43),'color':{'value':_0x1abe57['color'],'title':_0x1abe57['title']}};}return{'type':'format','content':t('*Remove\x20highlight*',t({'string':'highlight','id':'FORMAT_HIGHLIGHT'}))};}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x213e2f}from'ckeditor5/src/core';import'../../theme/integrations/horizontalline.css';export default class Q extends _0x213e2f{['afterInit'](){const _0x2e5764=this['editor'];if(!_0x2e5764['plugins']['has']('HorizontalLineEditing'))return;_0x2e5764['plugins']['get']('TrackChangesEditing')['enableCommand']('horizontalLine');const _0x4f12ac=_0x2e5764['plugins']['get']('TrackChangesEditing'),{t:t}=_0x2e5764['locale'];_0x4f12ac['_descriptionFactory']['registerElementLabel']('horizontalLine',_0x33aacb=>t({'string':'horizontal\x20line','plural':'%0\x20horizontal\x20lines','id':'ELEMENT_HORIZONTAL_LINE'},_0x33aacb)),_0x2e5764['conversion']['for']('dataDowncast')['elementToElement']({'model':'horizontalLine','view':(_0x5c97f6,{writer:_0x2a7e7e,options:_0x4b5751})=>{if(!_0x4b5751['showSuggestionHighlights'])return;const _0x1f1d4b=_0x2a7e7e['createContainerElement']('div'),_0x4159fc=_0x2a7e7e['createEmptyElement']('hr');return _0x2a7e7e['addClass']('ck-horizontal-line',_0x1f1d4b),_0x2a7e7e['insert'](_0x2a7e7e['createPositionAt'](_0x1f1d4b,0x0),_0x4159fc),_0x1f1d4b;},'converterPriority':'high'});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x5a6e1c}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0x45e4ea}from'ckeditor5/src/utils';import{getCaptionFromImageModelElement as _0x10e8e5}from'@ckeditor/ckeditor5-image/src/imagecaption/utils';import'../../theme/integrations/image.css';export default class V extends _0x5a6e1c{['afterInit'](){const _0x3da5f5=this['editor'];if(!_0x3da5f5['plugins']['has']('ImageEditing'))return;const _0x856082=_0x3da5f5['plugins']['get']('TrackChangesEditing'),_0x506465=_0x3da5f5['plugins']['get']('ImageUtils'),_0x526b4e={},{t:t}=_0x3da5f5['locale'];if(_0x856082['enableCommand']('insertImage'),_0x856082['_descriptionFactory']['registerElementLabel']('imageBlock',_0x427c19=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x427c19)),_0x856082['_descriptionFactory']['registerElementLabel']('imageInline',_0x4615a8=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x4615a8)),_0x856082['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0x3da5f5['plugins']['has']('ImageUploadEditing')&&_0x856082['enableCommand']('uploadImage'),_0x3da5f5['plugins']['has']('ImageBlockEditing')&&_0x3da5f5['plugins']['has']('ImageInlineEditing')&&(_0x856082['enableCommand']('imageTypeInline',(_0x4c5fbd,_0x1ab7f5)=>{const _0x1b5355=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']);_0x3da5f5['model']['change'](()=>{_0x856082['markBlockFormat'](_0x1b5355,{'commandName':'imageTypeInline','commandParams':[_0x1ab7f5]},[],'convertBlockImageToInline');});}),_0x856082['enableCommand']('imageTypeBlock',(_0x3b2c75,_0x3049b0)=>{_0x3da5f5['model']['change'](_0x2a2ddc=>{let _0x1c3b28=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x48db9a=_0x2a2ddc['createRangeOn'](_0x1c3b28);const _0x453d6f=te['fromPosition'](_0x48db9a['start'],'toPrevious'),_0x10d7cf=te['fromPosition'](_0x48db9a['end'],'toNext');_0x856082['forceDefaultExecution'](()=>_0x3b2c75(_0x3049b0)),_0x1c3b28=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x48db9a=_0x2a2ddc['createRangeOn'](_0x1c3b28);const _0x2a05e0=_0x2a2ddc['createRange'](_0x453d6f,_0x10d7cf);_0x453d6f['detach'](),_0x10d7cf['detach'](),_0x856082['markBlockFormat'](_0x1c3b28,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x2a05e0['start']['isBefore'](_0x48db9a['start'])&&_0x856082['markInsertion'](_0x2a2ddc['createRange'](_0x2a05e0['start'],_0x48db9a['start']),'convertInlineImageToBlock'),_0x48db9a['end']['isBefore'](_0x2a05e0['end'])&&_0x856082['markInsertion'](_0x2a2ddc['createRange'](_0x48db9a['end'],_0x2a05e0['end']),'convertInlineImageToBlock');});}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x856082['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x452037])=>{const _0x29f825=_0x856082['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x251867=_0x452037['start'],_0x5be7a7=_0x452037['end'];const _0x1dbbc7=_0x3da5f5['model']['schema']['getNearestSelectionRange'](_0x251867,'backward'),_0xd4fb41=_0x3da5f5['model']['schema']['getNearestSelectionRange'](_0x5be7a7,'forward');_0x1dbbc7['isCollapsed']&&(_0x251867=_0x1dbbc7['start']),_0xd4fb41['isCollapsed']&&(_0x5be7a7=_0xd4fb41['end']),_0x29f825([_0x3da5f5['model']['createRange'](_0x251867,_0x5be7a7)]);}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0xe4429c),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0xe4429c)),_0x3da5f5['plugins']['has']('ImageCaptionEditing')&&(_0x856082['enableCommand']('toggleImageCaption',(_0x50fc81,_0x4e057d)=>{let _0x537d11=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x5d2a25=_0x10e8e5(_0x537d11);_0x3da5f5['model']['change'](()=>{if(_0x5d2a25)return void _0x856082['markDeletion'](_0x3da5f5['model']['createRangeOn'](_0x5d2a25));const _0x4ee2b5=_0x506465['isBlockImage'](_0x537d11);_0x50fc81(_0x4e057d),_0x537d11=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x5d2a25=_0x10e8e5(_0x537d11),_0x856082['markInsertion'](_0x3da5f5['model']['createRangeOn'](_0x5d2a25),_0x4ee2b5?null:'imageCaption');});}),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0xe4429c)),_0x3da5f5['plugins']['has']('ImageStyleEditing')){_0x856082['enableCommand']('imageStyle',(_0x402ef3,_0x1ba28e)=>{const _0xfd219f=_0x3da5f5['plugins']['get']('Users')['me'],_0x29ef96=_0x3da5f5['commands']['get']('imageStyle');let _0x2f446e=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0xb89ee9=_0x3da5f5['model']['createRangeOn'](_0x2f446e),_0x1e6ae2=_0x29ef96['value'];if(_0x1e6ae2==_0x1ba28e['value'])return;const _0x348a45={'commandName':'imageStyle','commandParams':[_0x1ba28e],'formatGroupId':_0x45e4ea()};_0x3da5f5['model']['change'](()=>{if(_0x856082['getSuggestions']()['filter'](_0x2618d2=>_0x2618d2['isInContent']&&_0xfd219f==_0x2618d2['author']&&('formatBlock'==_0x2618d2['type']||'formatInline'==_0x2618d2['type'])&&('imageStylePreApply'==_0x2618d2['subType']||'imageStylePostApply'==_0x2618d2['subType'])&&_0x2618d2['getFirstRange']()['isEqual'](_0xb89ee9))['forEach'](_0x1ab402=>_0x856082['discardSuggestion'](_0x1ab402['head'])),_0x2f446e=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0xb89ee9=_0x3da5f5['model']['createRangeOn'](_0x2f446e),_0x29ef96['refresh'](),_0x3da5f5['commands']['get']('imageTypeInline')['refresh'](),_0x3da5f5['commands']['get']('imageTypeBlock')['refresh'](),_0x1e6ae2=_0x29ef96['value'],_0x1e6ae2!=_0x1ba28e['value'])return _0x506465['isInlineImage'](_0x2f446e)&&_0x29ef96['shouldConvertImageType'](_0x1ba28e['value'],_0x2f446e)?(_0x402ef3(_0x1ba28e),_0x2f446e=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),void _0x856082['markBlockFormat'](_0x2f446e,{..._0x348a45,'commandReversedParams':[{'value':_0x1e6ae2||null}]},[],'imageStylePreApply')):void(_0x506465['isBlockImage'](_0x2f446e)?_0x856082['markBlockFormat'](_0x2f446e,_0x348a45,[],'imageStylePostApply'):_0x856082['markInlineFormat'](_0xb89ee9,_0x348a45,'imageStylePostApply'));});});for(const _0x490141 of _0x3da5f5['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x526b4e[_0x490141['name']]=_0x490141['title']['toLowerCase']();_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x4b2596,_0x468f27)=>{_0x856082['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x4b2596,{'commandName':_0x468f27['commandName'],'commandParams':_0x468f27['commandReversedParams']});}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0xe4429c);}const _0x2d7aeb=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x16cc81(_0xed3e9a,_0x2ab086){const _0x49f753=_0x2d7aeb['findIndex'](({type:_0x4c51e7,subType:_0x3b3b71})=>_0xed3e9a['type']==_0x4c51e7&&_0xed3e9a['subType']==_0x3b3b71),_0x5eb2f5=_0x2d7aeb['findIndex'](({type:_0x36a557,subType:_0x57f699})=>_0x2ab086['type']==_0x36a557&&_0x2ab086['subType']==_0x57f699);if(_0x49f753<0x0||_0x5eb2f5<0x0)return!0x1;const _0x22eed7=_0xed3e9a['getFirstRange'](),_0xab5490=_0x2ab086['getFirstRange']();if((0x0==_0x49f753||0x1==_0x49f753)&&0x2==_0x5eb2f5&&_0x22eed7['isIntersecting'](_0xab5490))return!0x0;if(0x2==_0x49f753&&0x3==_0x5eb2f5){const _0x3c7709=_0x856082['_findSuggestions'](_0x22eed7,'insertion')['filter'](({suggestion:_0x246380,meta:_0x560a43})=>_0x560a43['isOwn']&&'convertInlineImageToBlock'==_0x246380['subType']);if(_0x3c7709['length']>0x1&&_0xab5490['end']['isEqual'](_0x22eed7['start']))return!0x0;if(0x1==_0x3c7709['length']&&(_0x22eed7['start']['isEqual'](_0xab5490['end'])||_0x22eed7['end']['isEqual'](_0xab5490['start'])))return!0x0;}if(0x3==_0x49f753&&0x3==_0x5eb2f5&&_0x22eed7['start']['isBefore'](_0xab5490['start'])){const _0x18365f=_0x22eed7['end']['nodeAfter'],_0xd13171=_0xab5490['start']['nodeBefore'];return _0x506465['isBlockImage'](_0x18365f)&&_0x18365f===_0xd13171;}return!0x1;}function _0xe4429c(_0x506789,_0x21a46b){return _0x16cc81(_0x506789,_0x21a46b)?[_0x506789,_0x21a46b]:_0x16cc81(_0x21a46b,_0x506789)?[_0x21a46b,_0x506789]:null;}_0x3da5f5['model']['document']['registerPostFixer'](()=>{let _0x1db3a5=!0x1;const _0x305068=Array['from'](_0x3da5f5['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x331f85,data:_0x184536}of _0x305068){const {group:_0x45b123,type:_0x502eaf,subType:_0x2bfbad,id:_0x5ea53c}=_0x856082['_splitMarkerName'](_0x331f85);if('suggestion'==_0x45b123&&_0x856082['hasSuggestion'](_0x5ea53c)){if('formatBlock'==_0x502eaf&&('imageStylePreApply'==_0x2bfbad||'imageStylePostApply'==_0x2bfbad)){const _0x36b4a9=_0x856082['getSuggestion'](_0x5ea53c);if(_0x184536['newRange']){const _0x154d03=_0x36b4a9['getFirstRange']()['getContainedElement']();if(_0x506465['isBlockImage'](_0x154d03))continue;_0x856082['discardSuggestion'](_0x36b4a9),_0x1db3a5=!0x0;}}if('insertion'==_0x502eaf&&'imageCaption'==_0x2bfbad&&!_0x184536['newRange']){const _0x3d778e=_0x856082['getSuggestion'](_0x5ea53c);_0x3d778e['next']&&_0x3d778e['next']['isInContent']&&(_0x856082['discardSuggestion'](_0x3d778e['next']),_0x1db3a5=!0x0);}}}return _0x1db3a5;}),_0x3da5f5['plugins']['has']('ImageResize')&&_0x856082['enableCommand']('resizeImage',(_0x59abd7,_0xd8707c)=>{const _0xfb4cbb=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']);_0xfb4cbb['getAttribute']('width')!=_0xd8707c['width']&&_0x3da5f5['model']['change'](()=>{_0x856082['markBlockFormat'](_0xfb4cbb,{'commandName':'resizeImage','commandParams':[_0xd8707c]});});}),_0x3da5f5['plugins']['has']('ImageTextAlternativeEditing')&&_0x856082['enableCommand']('imageTextAlternative',(_0x9020f1,_0x49aa72)=>{const _0x58d930=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']);(_0x58d930['hasAttribute']('alt')?_0x58d930['getAttribute']('alt'):'')!=_0x49aa72['newValue']&&_0x3da5f5['model']['change'](()=>{_0x856082['markBlockFormat'](_0x58d930,{'commandName':'imageTextAlternative','commandParams':[_0x49aa72]});});}),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x3e86a4=>{if(!!_0x2d7aeb['find'](({type:_0x1adacb,subType:_0x5d35d1})=>_0x3e86a4['type']==_0x1adacb&&_0x3e86a4['subType']==_0x5d35d1))return _0x3e86a4['previous']?{}:void 0x0;}),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x348b75=>{if('insertion'==_0x348b75['type']||'deletion'==_0x348b75['type']){const _0x347f3e=_0x348b75['getContainedElement']();if(_0x347f3e&&_0x347f3e['is']('element','caption'))return{'type':'insertion'==_0x348b75['type']?'addObject':'removeObject','name':_0x347f3e['name'],'quantity':0x1};}}),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x39786b=>'formatBlock'==_0x39786b['type']&&'convertInlineImageToBlock'==_0x39786b['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0x39786b['type']&&'convertBlockImageToInline'==_0x39786b['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x5dd94e=>{const {data:_0x2fe58d}=_0x5dd94e;if(_0x2fe58d){if('imageStyle'==_0x2fe58d['commandName']){const _0x1a92c4=_0x2fe58d['commandParams'][0x0]['value'];return _0x1bff96('side'===_0x1a92c4?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x526b4e[_0x1a92c4]||_0x1a92c4);}if('imageTextAlternative'==_0x2fe58d['commandName']){const _0x28208e=_0x2fe58d['commandParams'][0x0]['newValue'];return _0x28208e?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x28208e+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x2fe58d['commandName']){const _0x5b9ad7=_0x2fe58d['commandParams'][0x0]['width'];return _0x5b9ad7?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x5b9ad7)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x1bff96(_0x56d344){return{'type':'format','content':t('*Format:*\x20%0',_0x56d344)};}});}}
|
|
23
|
+
import{Plugin as _0x248c82}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0x389158}from'ckeditor5/src/utils';import{getCaptionFromImageModelElement as _0x4a95b3}from'@ckeditor/ckeditor5-image/src/imagecaption/utils';import'../../theme/integrations/image.css';export default class V extends _0x248c82{['afterInit'](){const _0x2397a1=this['editor'];if(!_0x2397a1['plugins']['has']('ImageEditing'))return;const _0x2ab318=_0x2397a1['plugins']['get']('TrackChangesEditing'),_0x3b6485=_0x2397a1['plugins']['get']('ImageUtils'),_0x166ade={},{t:t}=_0x2397a1['locale'];if(_0x2ab318['enableCommand']('insertImage'),_0x2ab318['_descriptionFactory']['registerElementLabel']('imageBlock',_0x316716=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x316716)),_0x2ab318['_descriptionFactory']['registerElementLabel']('imageInline',_0x1c6693=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x1c6693)),_0x2ab318['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0x2397a1['plugins']['has']('ImageUploadEditing')&&_0x2ab318['enableCommand']('uploadImage'),_0x2397a1['plugins']['has']('ImageBlockEditing')&&_0x2397a1['plugins']['has']('ImageInlineEditing')&&(_0x2ab318['enableCommand']('imageTypeInline',(_0x2c605c,_0x4f841f)=>{const _0x3b1a97=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']);_0x2397a1['model']['change'](()=>{_0x2ab318['markBlockFormat'](_0x3b1a97,{'commandName':'imageTypeInline','commandParams':[_0x4f841f]},[],'convertBlockImageToInline');});}),_0x2ab318['enableCommand']('imageTypeBlock',(_0x1ea9b,_0x5c6524)=>{_0x2397a1['model']['change'](_0x33beed=>{let _0x463273=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x1fae67=_0x33beed['createRangeOn'](_0x463273);const _0x30ab20=te['fromPosition'](_0x1fae67['start'],'toPrevious'),_0x458682=te['fromPosition'](_0x1fae67['end'],'toNext');_0x2ab318['forceDefaultExecution'](()=>_0x1ea9b(_0x5c6524)),_0x463273=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x1fae67=_0x33beed['createRangeOn'](_0x463273);const _0x6db590=_0x33beed['createRange'](_0x30ab20,_0x458682);_0x30ab20['detach'](),_0x458682['detach'](),_0x2ab318['markBlockFormat'](_0x463273,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x6db590['start']['isBefore'](_0x1fae67['start'])&&_0x2ab318['markInsertion'](_0x33beed['createRange'](_0x6db590['start'],_0x1fae67['start']),'convertInlineImageToBlock'),_0x1fae67['end']['isBefore'](_0x6db590['end'])&&_0x2ab318['markInsertion'](_0x33beed['createRange'](_0x1fae67['end'],_0x6db590['end']),'convertInlineImageToBlock');});}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x2ab318['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x1f83fc])=>{const _0x13921e=_0x2ab318['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x14616f=_0x1f83fc['start'],_0x1d707d=_0x1f83fc['end'];const _0x4e407c=_0x2397a1['model']['schema']['getNearestSelectionRange'](_0x14616f,'backward'),_0x324f25=_0x2397a1['model']['schema']['getNearestSelectionRange'](_0x1d707d,'forward');_0x4e407c['isCollapsed']&&(_0x14616f=_0x4e407c['start']),_0x324f25['isCollapsed']&&(_0x1d707d=_0x324f25['end']),_0x13921e([_0x2397a1['model']['createRange'](_0x14616f,_0x1d707d)]);}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0x168517),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0x168517)),_0x2397a1['plugins']['has']('ImageCaptionEditing')&&(_0x2ab318['enableCommand']('toggleImageCaption',(_0x18a308,_0x3da695)=>{let _0x449561=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x37f2e3=_0x4a95b3(_0x449561);_0x2397a1['model']['change'](()=>{if(_0x37f2e3)return void _0x2ab318['markDeletion'](_0x2397a1['model']['createRangeOn'](_0x37f2e3));const _0x2ab4a9=_0x3b6485['isBlockImage'](_0x449561);_0x18a308(_0x3da695),_0x449561=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x37f2e3=_0x4a95b3(_0x449561),_0x2ab318['markInsertion'](_0x2397a1['model']['createRangeOn'](_0x37f2e3),_0x2ab4a9?null:'imageCaption');});}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0x168517)),_0x2397a1['plugins']['has']('ImageStyleEditing')){_0x2ab318['enableCommand']('imageStyle',(_0x1ae775,_0x4537ab)=>{const _0x444e7b=_0x2397a1['plugins']['get']('Users')['me'],_0x525668=_0x2397a1['commands']['get']('imageStyle');let _0x1ac194=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x10859f=_0x2397a1['model']['createRangeOn'](_0x1ac194),_0x4f85b2=_0x525668['value'];if(_0x4f85b2==_0x4537ab['value'])return;const _0x2899b6={'commandName':'imageStyle','commandParams':[_0x4537ab],'formatGroupId':_0x389158()};_0x2397a1['model']['change'](()=>{if(_0x2ab318['getSuggestions']()['filter'](_0x2b1441=>_0x2b1441['isInContent']&&_0x444e7b==_0x2b1441['author']&&('formatBlock'==_0x2b1441['type']||'formatInline'==_0x2b1441['type'])&&('imageStylePreApply'==_0x2b1441['subType']||'imageStylePostApply'==_0x2b1441['subType'])&&_0x2b1441['getFirstRange']()['isEqual'](_0x10859f))['forEach'](_0x13ffc8=>_0x2ab318['discardSuggestion'](_0x13ffc8['head'])),_0x1ac194=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x10859f=_0x2397a1['model']['createRangeOn'](_0x1ac194),_0x525668['refresh'](),_0x2397a1['commands']['get']('imageTypeInline')['refresh'](),_0x2397a1['commands']['get']('imageTypeBlock')['refresh'](),_0x4f85b2=_0x525668['value'],_0x4f85b2!=_0x4537ab['value'])return _0x3b6485['isInlineImage'](_0x1ac194)&&_0x525668['shouldConvertImageType'](_0x4537ab['value'],_0x1ac194)?(_0x1ae775(_0x4537ab),_0x1ac194=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),void _0x2ab318['markBlockFormat'](_0x1ac194,{..._0x2899b6,'commandReversedParams':[{'value':_0x4f85b2||null}]},[],'imageStylePreApply')):void(_0x3b6485['isBlockImage'](_0x1ac194)?_0x2ab318['markBlockFormat'](_0x1ac194,_0x2899b6,[],'imageStylePostApply'):_0x2ab318['markInlineFormat'](_0x10859f,_0x2899b6,'imageStylePostApply'));});});for(const _0x5384a7 of _0x2397a1['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x166ade[_0x5384a7['name']]=_0x5384a7['title']['toLowerCase']();_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x36b276,_0x389a9d)=>{_0x2ab318['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x36b276,{'commandName':_0x389a9d['commandName'],'commandParams':_0x389a9d['commandReversedParams']});}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0x168517);}const _0x2e7385=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x3c4d2f(_0x23df94,_0x5545f5){const _0xcf19ae=_0x2e7385['findIndex'](({type:_0x42d133,subType:_0x100c1e})=>_0x23df94['type']==_0x42d133&&_0x23df94['subType']==_0x100c1e),_0x24be64=_0x2e7385['findIndex'](({type:_0x20c714,subType:_0x44aa56})=>_0x5545f5['type']==_0x20c714&&_0x5545f5['subType']==_0x44aa56);if(_0xcf19ae<0x0||_0x24be64<0x0)return!0x1;const _0x287a4a=_0x23df94['getFirstRange'](),_0x2c515e=_0x5545f5['getFirstRange']();if((0x0==_0xcf19ae||0x1==_0xcf19ae)&&0x2==_0x24be64&&_0x287a4a['isIntersecting'](_0x2c515e))return!0x0;if(0x2==_0xcf19ae&&0x3==_0x24be64){const _0x5a5d49=_0x2ab318['_findSuggestions'](_0x287a4a,'insertion')['filter'](({suggestion:_0x49d07e,meta:_0x248ceb})=>_0x248ceb['isOwn']&&'convertInlineImageToBlock'==_0x49d07e['subType']);if(_0x5a5d49['length']>0x1&&_0x2c515e['end']['isEqual'](_0x287a4a['start']))return!0x0;if(0x1==_0x5a5d49['length']&&(_0x287a4a['start']['isEqual'](_0x2c515e['end'])||_0x287a4a['end']['isEqual'](_0x2c515e['start'])))return!0x0;}if(0x3==_0xcf19ae&&0x3==_0x24be64&&_0x287a4a['start']['isBefore'](_0x2c515e['start'])){const _0x1df20e=_0x287a4a['end']['nodeAfter'],_0x70a311=_0x2c515e['start']['nodeBefore'];return _0x3b6485['isBlockImage'](_0x1df20e)&&_0x1df20e===_0x70a311;}return!0x1;}function _0x168517(_0x53a7d9,_0x1eee94){return _0x3c4d2f(_0x53a7d9,_0x1eee94)?[_0x53a7d9,_0x1eee94]:_0x3c4d2f(_0x1eee94,_0x53a7d9)?[_0x1eee94,_0x53a7d9]:null;}_0x2397a1['model']['document']['registerPostFixer'](()=>{let _0x30486d=!0x1;const _0x119470=Array['from'](_0x2397a1['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x32fdfa,data:_0x46017f}of _0x119470){const {group:_0x1e4695,type:_0x56ebe7,subType:_0x27d479,id:_0x33e31f}=_0x2ab318['_splitMarkerName'](_0x32fdfa);if('suggestion'==_0x1e4695&&_0x2ab318['hasSuggestion'](_0x33e31f)){if('formatBlock'==_0x56ebe7&&('imageStylePreApply'==_0x27d479||'imageStylePostApply'==_0x27d479)){const _0x4a949a=_0x2ab318['getSuggestion'](_0x33e31f);if(_0x46017f['newRange']){const _0x169f8b=_0x4a949a['getFirstRange']()['getContainedElement']();if(_0x3b6485['isBlockImage'](_0x169f8b))continue;_0x2ab318['discardSuggestion'](_0x4a949a),_0x30486d=!0x0;}}if('insertion'==_0x56ebe7&&'imageCaption'==_0x27d479&&!_0x46017f['newRange']){const _0x344291=_0x2ab318['getSuggestion'](_0x33e31f);_0x344291['next']&&_0x344291['next']['isInContent']&&(_0x2ab318['discardSuggestion'](_0x344291['next']),_0x30486d=!0x0);}}}return _0x30486d;}),_0x2397a1['plugins']['has']('ImageResize')&&_0x2ab318['enableCommand']('resizeImage',(_0x48b7ae,_0xa34f5c)=>{const _0x30c294=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']);_0x30c294['getAttribute']('width')!=_0xa34f5c['width']&&_0x2397a1['model']['change'](()=>{_0x2ab318['markBlockFormat'](_0x30c294,{'commandName':'resizeImage','commandParams':[_0xa34f5c]});});}),_0x2397a1['plugins']['has']('ImageTextAlternativeEditing')&&_0x2ab318['enableCommand']('imageTextAlternative',(_0x6c3715,_0x269a06)=>{const _0x438f19=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']);(_0x438f19['hasAttribute']('alt')?_0x438f19['getAttribute']('alt'):'')!=_0x269a06['newValue']&&_0x2397a1['model']['change'](()=>{_0x2ab318['markBlockFormat'](_0x438f19,{'commandName':'imageTextAlternative','commandParams':[_0x269a06]});});}),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x34216b=>{if(!!_0x2e7385['find'](({type:_0x47ca7f,subType:_0x36e6d9})=>_0x34216b['type']==_0x47ca7f&&_0x34216b['subType']==_0x36e6d9))return _0x34216b['previous']?{}:void 0x0;}),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x5a1723=>{if('insertion'==_0x5a1723['type']||'deletion'==_0x5a1723['type']){const _0x1e3cb6=_0x5a1723['getContainedElement']();if(_0x1e3cb6&&_0x1e3cb6['is']('element','caption'))return{'type':'insertion'==_0x5a1723['type']?'addObject':'removeObject','name':_0x1e3cb6['name'],'quantity':0x1};}}),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x1ab3b3=>'formatBlock'==_0x1ab3b3['type']&&'convertInlineImageToBlock'==_0x1ab3b3['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0x1ab3b3['type']&&'convertBlockImageToInline'==_0x1ab3b3['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x4d5f36=>{const {data:_0x4d402d}=_0x4d5f36;if(_0x4d402d){if('imageStyle'==_0x4d402d['commandName']){const _0x3ff01f=_0x4d402d['commandParams'][0x0]['value'];return _0x2ab261('side'===_0x3ff01f?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x166ade[_0x3ff01f]||_0x3ff01f);}if('imageTextAlternative'==_0x4d402d['commandName']){const _0x448b52=_0x4d402d['commandParams'][0x0]['newValue'];return _0x448b52?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x448b52+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x4d402d['commandName']){const _0x116ef8=_0x4d402d['commandParams'][0x0]['width'];return _0x116ef8?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x116ef8)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x2ab261(_0x3c6e1b){return{'type':'format','content':t('*Format:*\x20%0',_0x3c6e1b)};}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x3cee8f}from'ckeditor5/src/core';export default class X extends _0x3cee8f{['afterInit'](){const _0x4c3caf=this['editor'],_0x40fb20=_0x4c3caf['plugins']['get']('TrackChangesEditing');_0x4c3caf['plugins']['has']('IndentEditing')&&(_0x40fb20['enableCommand']('indent'),_0x40fb20['enableCommand']('outdent'));const {t:t}=_0x4c3caf['locale'];if(_0x4c3caf['plugins']['has']('IndentBlock')){for(const _0x240988 of['indentBlock','outdentBlock'])_0x40fb20['enableCommand'](_0x240988,()=>{const _0x583f53=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x584334=>this['editor']['model']['schema']['checkAttribute'](_0x584334,'blockIndent'));_0x4c3caf['model']['change'](()=>{for(const _0x55eed9 of _0x583f53)_0x40fb20['markBlockFormat'](_0x55eed9,{'commandName':_0x240988,'commandParams':[{'value':''}],'formatGroupId':'indentBlock'});});});_0x40fb20['_descriptionFactory']['registerDescriptionCallback'](_0x375e7c=>{const {data:_0x5b27b8}=_0x375e7c;if(!_0x5b27b8)return;if('indentBlock'!=_0x5b27b8['commandName']&&'outdentBlock'!=_0x5b27b8['commandName'])return;const _0x2d9c40=_0x375e7c['getItems']()[0x0],_0x371110=_0x40fb20['_descriptionFactory']['getItemLabel'](_0x2d9c40['name']);return'indentBlock'==_0x5b27b8['commandName']?{'type':'format','content':t('*Indent:*\x20%0',_0x371110)}:'outdentBlock'==_0x5b27b8['commandName']?{'type':'format','content':t('*Outdent:*\x20%0',_0x371110)}:void 0x0;});}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x9874=['editor','requires','enableCommand','TrackChangesEditing','init','get','plugins'];(function(_0x3fb68d,_0x9874e2){var _0x2d7ea0=function(_0x1d8432){while(--_0x1d8432){_0x3fb68d['push'](_0x3fb68d['shift']());}};_0x2d7ea0(++_0x9874e2);}(_0x9874,0x16f));var _0x2d7e=function(_0x3fb68d,_0x9874e2){_0x3fb68d=_0x3fb68d-0x0;var _0x2d7ea0=_0x9874[_0x3fb68d];return _0x2d7ea0;};import{Plugin as _0x2f9202}from'ckeditor5/src/core';import{Input as _0x2f89b9}from'ckeditor5/src/typing';export default class Y extends _0x2f9202{static get[_0x2d7e('0x5')](){return[_0x2f89b9];}[_0x2d7e('0x1')](){this[_0x2d7e('0x4')][_0x2d7e('0x3')][_0x2d7e('0x2')](_0x2d7e('0x0'))[_0x2d7e('0x6')]('input');}}
|
package/src/integrations/link.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x209508}from'ckeditor5/src/core';import{findAttributeRange as _0x239310}from'ckeditor5/src/typing';import{getRangesWithAttribute as Rt}from'./utils';export default class Z extends _0x209508{['afterInit'](){const _0x1cf622=this['editor'];if(!_0x1cf622['plugins']['has']('LinkEditing'))return;const _0xcb71d=_0x1cf622['plugins']['get']('TrackChangesEditing');_0xcb71d['enableCommand']('link',(_0x373301,_0x5a72bc)=>{const _0x3bda45=_0x1cf622['model']['document']['selection'];let _0x3c5ba8=[];if(_0x3bda45['isCollapsed']){if(!_0x3bda45['hasAttribute']('linkHref'))return void _0x373301(_0x5a72bc);{const _0x1be42a=_0x239310(_0x3bda45['getFirstPosition'](),'linkHref',_0x3bda45['getAttribute']('linkHref'),_0x1cf622['model']);_0x3c5ba8=[_0x1be42a];}}else _0x3c5ba8=Array['from'](_0x3bda45['getRanges']());_0x1cf622['model']['change'](()=>{for(const _0x112019 of _0x3c5ba8)_0xcb71d['markInlineFormat'](_0x112019,{'commandName':'link','commandParams':[_0x5a72bc]});});}),_0xcb71d['enableCommand']('unlink',()=>{const _0x43c2de=this['editor']['model'],_0x27de4f=_0x43c2de['document']['selection'];_0x43c2de['change'](()=>{let _0x4a3af2=[];if(_0x27de4f['isCollapsed'])_0x4a3af2=[_0x239310(_0x27de4f['getFirstPosition'](),'linkHref',_0x27de4f['getAttribute']('linkHref'),_0x1cf622['model'])];else _0x4a3af2=Rt('linkHref',_0x27de4f['getFirstRange'](),_0x1cf622['model']);for(const _0x27a67c of _0x4a3af2)_0xcb71d['markInlineFormat'](_0x27a67c,{'commandName':'unlink','commandParams':[]});});}),_0xcb71d['_descriptionFactory']['registerDescriptionCallback'](_0x2252db=>{const {data:_0x3dba53}=_0x2252db,{t:t}=_0x1cf622['locale'];if(_0x3dba53){if('link'==_0x3dba53['commandName'])return{'type':'format','content':t('*Set\x20link:*\x20%0','\x22'+_0x3dba53['commandParams'][0x0]+'\x22')};return'unlink'==_0x3dba53['commandName']?{'type':'format','content':t('*Remove\x20link*')}:void 0x0;}});}}
|
package/src/integrations/list.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x1cc2dc}from'ckeditor5/src/core';export default class tt extends _0x1cc2dc{['afterInit'](){const _0x5914d2=this['editor'];if(!_0x5914d2['plugins']['has']('ListEditing'))return;const _0x4357b6=_0x5914d2['plugins']['get']('TrackChangesEditing'),_0x23275e=_0x5914d2['plugins']['has']('TodoListEditing');function _0x8203a4(_0x2ee5a9){return()=>{const _0x59dc83=_0x5914d2['model']['document']['selection'],_0x12577c=_0x5914d2['commands']['get'](_0x2ee5a9);if(_0x12577c['value'])return void _0x5914d2['execute']('paragraph',{});const _0x384e4e=_0x2ee5a9['slice'](0x0,-0x4),_0x43bde7=function(_0x4b25a5,_0x1f9362,_0x327642){let _0x5bfc7b=Array['from'](_0x4b25a5)['filter'](_0x43ad71=>function(_0x49268d,_0x2c077e){return _0x2c077e['checkChild'](_0x49268d['parent'],'listItem')&&!_0x2c077e['isObject'](_0x49268d);}(_0x43ad71,_0x327642));_0x5bfc7b=_0x5bfc7b['filter'](_0x140d85=>!_0x140d85['is']('element','listItem')||_0x140d85['getAttribute']('listType')!=_0x1f9362);const _0x2b6db9=new Set();for(const _0x418203 of _0x5bfc7b)_0x418203['is']('element','listItem')?_0x2b6db9['add'](Zt(_0x418203)):_0x2b6db9['add'](_0x418203);return Array['from'](_0x2b6db9);}(_0x59dc83['getSelectedBlocks'](),_0x384e4e,_0x5914d2['model']['schema']);_0x5914d2['model']['change'](()=>{for(const _0x2ff6ea of _0x43bde7)_0x4357b6['markBlockFormat'](_0x2ff6ea,{'commandName':_0x2ee5a9,'commandParams':[{'forceValue':!_0x12577c['value']}],'formatGroupId':'blockName'},$t(_0x2ff6ea));});};}function _0x39f6be(_0xfb6c86){return()=>{const _0x1d0b1d=function(_0x248df6){const _0x3dec0c=(_0x248df6=Array['from'](_0x248df6))['findIndex'](_0x4b4176=>'listItem'!=_0x4b4176['name']);return _0x3dec0c>-0x1&&(_0x248df6=_0x248df6['slice'](0x0,_0x3dec0c)),_0x248df6;}(_0x5914d2['model']['document']['selection']['getSelectedBlocks']()),_0x49165b=_0x5914d2['model']['createRange'](_0x5914d2['model']['createPositionAt'](_0x1d0b1d[0x0],'before'),_0x5914d2['model']['createPositionAt'](_0x1d0b1d[_0x1d0b1d['length']-0x1],'end'));_0x5914d2['model']['change'](()=>{_0x4357b6['markBlockFormat'](_0x49165b,{'commandName':_0xfb6c86,'commandParams':[],'formatGroupId':'listIndent'},function(_0x32b5b8){const _0x5bb1d0=new Set();for(const _0x6cc3f2 of _0x32b5b8){let _0x10ce21=_0x6cc3f2['nextSibling'];for(;_0x10ce21&&_0x10ce21['getAttribute']('listIndent')>_0x6cc3f2['getAttribute']('listIndent');)_0x5bb1d0['add'](_0x10ce21),_0x10ce21=_0x10ce21['nextSibling'];}return Array['from'](_0x5bb1d0);}(_0x1d0b1d));});};}_0x4357b6['enableCommand']('numberedList',_0x8203a4('numberedList')),_0x4357b6['enableCommand']('bulletedList',_0x8203a4('bulletedList')),_0x23275e&&_0x4357b6['enableCommand']('todoList',_0x8203a4('todoList')),_0x4357b6['enableCommand']('indentList',_0x39f6be('indentList')),_0x4357b6['enableCommand']('outdentList',_0x39f6be('outdentList')),_0x23275e&&_0x4357b6['enableCommand']('checkTodoList',()=>{const _0xf998d1=_0x5914d2['commands']['get']('checkTodoList'),_0x3219f2=Array['from'](_0xf998d1['_selectedElements']);_0x3219f2['filter'](_0x2b122c=>_0x2b122c['getAttribute']('todoListChecked')!=_0xf998d1['value']),_0x5914d2['model']['change'](()=>{for(const _0x45c31e of _0x3219f2)_0x4357b6['markBlockFormat'](_0x45c31e,{'commandName':'checkTodoList','commandParams':[{'forceValue':!_0xf998d1['value']}]});});});const {t:t}=_0x5914d2['locale'];_0x4357b6['_descriptionFactory']['registerElementLabel']('listItem',_0x374c43=>t({'string':'list\x20item','plural':'%0\x20list\x20items','id':'ELEMENT_LIST_ITEM'},_0x374c43)),_0x4357b6['_descriptionFactory']['registerDescriptionCallback'](_0x300926=>{const {data:_0x1cda8d}=_0x300926;if(_0x1cda8d){if('numberedList'==_0x1cda8d['commandName']||'bulletedList'==_0x1cda8d['commandName']||'todoList'==_0x1cda8d['commandName'])switch(_0x1cda8d['commandName']['replace']('List','')){case'bulleted':return _0x52cbcc(t({'string':'bulleted\x20list','id':'ELEMENT_BULLETED_LIST'}));case'numbered':return _0x52cbcc(t({'string':'numbered\x20list','id':'ELEMENT_NUMBERED_LIST'}));case'todo':return _0x52cbcc(t({'string':'to-do\x20list','id':'ELEMENT_TODO_LIST'}));}if('indentList'==_0x1cda8d['commandName'])return{'type':'format','content':t('*Indent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('outdentList'==_0x1cda8d['commandName'])return{'type':'format','content':t('*Outdent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('checkTodoList'==_0x1cda8d['commandName'])return _0x1cda8d['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Check\x20item*')}:{'type':'format','content':t('*Uncheck\x20item*')};}function _0x52cbcc(_0x2456ba){return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x2456ba)};}});}}function Zt(_0x3ffe06){const _0x5a495c=_0x3ffe06['getAttribute']('listIndent');if(0x0==_0x5a495c)return _0x3ffe06;let _0x8c833=_0x3ffe06;for(;_0x3ffe06['previousSibling']&&_0x3ffe06['previousSibling']['is']('element','listItem');){const _0x48fca6=_0x3ffe06['previousSibling']['getAttribute']('listIndent');if(_0x48fca6==_0x5a495c)_0x8c833=_0x3ffe06['previousSibling'];else{if(_0x48fca6<_0x5a495c)break;}_0x3ffe06=_0x3ffe06['previousSibling'];}return _0x8c833;}function $t(_0x26320d){const _0x431bfc=[];if(_0x26320d['is']('element','listItem')&&_0x26320d['getAttribute']('listIndent')>0x0){let _0x2d0d93=_0x26320d['nextSibling'];for(;_0x2d0d93&&'listItem'==_0x2d0d93['name']&&_0x2d0d93['getAttribute']('listIndent')==_0x26320d['getAttribute']('listIndent');)_0x431bfc['push'](_0x2d0d93),_0x2d0d93=_0x2d0d93['nextSibling'];}return _0x431bfc;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5498b7}from'ckeditor5/src/core';import'../../theme/integrations/mediaembed.css';export default class it extends _0x5498b7{['afterInit'](){const _0x16d75e=this['editor'];if(!_0x16d75e['plugins']['has']('MediaEmbedEditing'))return;const _0x1b3a8a=_0x16d75e['plugins']['get']('TrackChangesEditing'),{t:t}=_0x16d75e['locale'];_0x1b3a8a['enableCommand']('mediaEmbed'),_0x1b3a8a['_descriptionFactory']['registerElementLabel']('media',_0x32319f=>t({'string':'media\x20item','plural':'%0\x20media\x20items','id':'ELEMENT_MEDIA'},_0x32319f)),_0x16d75e['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xa78fda,{writer:_0x397f12,options:_0x4a0ded})=>{if(_0x4a0ded['showSuggestionHighlights'])return _0x397f12['createEmptyElement']('div');},'converterPriority':'high'}),_0x16d75e['data']['downcastDispatcher']['on']('attribute:url:media',(_0x53fc7d,_0x417f73,_0x26aee9)=>{_0x26aee9['options']['showSuggestionHighlights']&&_0x53fc7d['stop']();},{'priority':'high'});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x28d4=['has','editor','mention','MentionEditing','get','plugins','enableCommand'];(function(_0x587d52,_0x28d428){const _0x19ba59=function(_0x3559fa){while(--_0x3559fa){_0x587d52['push'](_0x587d52['shift']());}};_0x19ba59(++_0x28d428);}(_0x28d4,0x1d8));const _0x19ba=function(_0x587d52,_0x28d428){_0x587d52=_0x587d52-0x0;let _0x19ba59=_0x28d4[_0x587d52];return _0x19ba59;};import{Plugin as _0x36d79b}from'ckeditor5/src/core';export default class st extends _0x36d79b{['afterInit'](){const _0x21707f=this[_0x19ba('0x5')];_0x21707f[_0x19ba('0x2')][_0x19ba('0x4')](_0x19ba('0x0'))&&_0x21707f[_0x19ba('0x2')][_0x19ba('0x1')]('TrackChangesEditing')[_0x19ba('0x3')](_0x19ba('0x6'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x260db1}from'ckeditor5/src/core';import'../../theme/integrations/pagebreak.css';export default class nt extends _0x260db1{['afterInit'](){const _0x598806=this['editor'];if(!_0x598806['plugins']['has']('PageBreakEditing'))return;_0x598806['plugins']['get']('TrackChangesEditing')['enableCommand']('pageBreak');const _0x113505=_0x598806['plugins']['get']('TrackChangesEditing'),{t:t}=_0x598806['locale'];_0x113505['_descriptionFactory']['registerElementLabel']('pageBreak',_0x1255e2=>t({'string':'page\x20break','plural':'%0\x20page\x20breaks','id':'ELEMENT_PAGE_BREAK'},_0x1255e2));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x375a34}from'ckeditor5/src/core';import{getElementsAffectedByListItemRename as _0xb5fa0f}from'./utils';export default class et extends _0x375a34{['afterInit'](){const _0x2c9a50=this['editor'];if(!_0x2c9a50['plugins']['has']('Paragraph'))return;const {t:t}=_0x2c9a50['locale'],_0x1d97a7=_0x2c9a50['plugins']['get']('TrackChangesEditing');_0x1d97a7['_descriptionFactory']['registerElementLabel']('paragraph',_0x5ad920=>t({'string':'paragraph','plural':'%0\x20paragraphs','id':'ELEMENT_PARAGRAPH'},_0x5ad920)),_0x1d97a7['enableCommand']('paragraph',(_0x5d9138,_0xca7ea3={})=>{const _0x2c6ed0=_0x2c9a50['model']['document'],_0x44ad41=_0xca7ea3['selection']||_0x2c6ed0['selection'],_0x3bc319=Array['from'](_0x44ad41['getSelectedBlocks']())['filter'](_0x1c1564=>function(_0x3013d3,_0x4ef344){return _0x4ef344['checkChild'](_0x3013d3['parent'],'paragraph')&&!_0x4ef344['isObject'](_0x3013d3)&&'paragraph'!=_0x3013d3['name'];}(_0x1c1564,this['editor']['model']['schema']));_0x2c9a50['model']['change'](()=>{for(const _0xcd562d of _0x3bc319)_0x1d97a7['markBlockFormat'](_0xcd562d,{'commandName':'paragraph','commandParams':[],'formatGroupId':'blockName'},_0xb5fa0f(_0xcd562d));});}),_0x1d97a7['_descriptionFactory']['registerDescriptionCallback'](_0x11fad6=>{const {data:_0x2576ea}=_0x11fad6;if(_0x2576ea&&'paragraph'==_0x2576ea['commandName'])return{'type':'format','content':t('*Change\x20to:*\x20%0',t({'string':'paragraph','plural':'%0\x20paragraphs','id':'ELEMENT_PARAGRAPH'}))};}),_0x1d97a7['enableCommand']('insertParagraph'),_0x2c9a50['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',tr(_0x2c9a50),{'priority':'highest'}),_0x2c9a50['data']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x2651ac,_0x3d79e8,_0x38f710)=>{_0x38f710['options']['showSuggestionHighlights']&&tr(_0x2c9a50,{'showActiveMarker':!0x1})(_0x2651ac,_0x3d79e8,_0x38f710);},{'priority':'highest'});const _0x268f1f=_0x1d97a7['_descriptionFactory'];_0x268f1f['registerDescriptionCallback'](_0x3944e3=>{if('insertion'!==_0x3944e3['type'])return;const {start:_0x21a7c3,end:_0x26b2e1}=_0x3944e3['getFirstRange']();if(!_0x21a7c3['isTouching'](_0x26b2e1)||!_0x21a7c3['nodeAfter'])return;const _0x1946ad=_0x2c9a50['model']['schema'],_0x283820=_0x21a7c3['nodeAfter'];return _0x1946ad['isBlock'](_0x283820)&&!_0x1946ad['isLimit'](_0x283820)&&_0x1946ad['checkChild'](_0x283820,'$text')?{'type':'insertion','content':t('*Insert:*\x20%0',_0x268f1f['getItemLabel'](_0x283820['name'],0x1))}:void 0x0;});}}function tr(_0x5cf813,{showActiveMarker:_0x270fa6=!0x0}={}){return(_0x5680f8,_0x19e22b,_0x608b99)=>{const _0x3cf7e6=_0x5cf813['plugins']['get']('TrackChangesEditing'),_0x32c3b3=_0x19e22b['markerRange']['start'],_0x3b9c2d=_0x19e22b['markerRange']['end'],_0x27c181=_0x5cf813['model']['schema'];if(!_0x32c3b3['isTouching'](_0x3b9c2d)||!_0x32c3b3['nodeAfter'])return;const _0x1fc8ac=_0x32c3b3['nodeAfter'];if(_0x27c181['isBlock'](_0x1fc8ac)&&!_0x27c181['isLimit'](_0x1fc8ac)&&_0x27c181['checkChild'](_0x1fc8ac,'$text')){if(!_0x608b99['consumable']['consume'](_0x19e22b['markerRange'],_0x5680f8['name']))return;const _0x17f6ba=_0x608b99['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-split'}),_0x164bce=_0x608b99['mapper']['toViewPosition'](_0x3b9c2d);_0x270fa6&&_0x3cf7e6['activeMarkers']['includes'](_0x19e22b['markerName'])&&_0x608b99['writer']['addClass']('ck-suggestion-marker--active',_0x17f6ba),_0x608b99['writer']['insert'](_0x164bce,_0x17f6ba),_0x608b99['mapper']['bindElementToMarker'](_0x17f6ba,_0x19e22b['markerName']);}};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x58731a}from'ckeditor5/src/core';export default class ot extends _0x58731a{['afterInit'](){const _0x82ebe4=this['editor'];if(!_0x82ebe4['plugins']['has']('RemoveFormatEditing'))return;const _0x4c63a9=_0x82ebe4['plugins']['get']('TrackChangesEditing');_0x4c63a9['enableCommand']('removeFormat',_0x3e033e=>{const _0x5a4738=_0x82ebe4['model']['document']['selection'];_0x5a4738['isCollapsed']?_0x3e033e():_0x82ebe4['model']['change'](()=>{const _0x46a0ea=Array['from'](_0x5a4738['getRanges']());for(const _0x2b4f7f of _0x46a0ea)for(const _0x13aeed of _0x2b4f7f['getItems']())to(_0x13aeed,_0x82ebe4['model']['schema'])&&_0x4c63a9['markInlineFormat'](_0x82ebe4['model']['createRangeOn'](_0x13aeed),{'commandName':'removeFormat','commandParams':[]});});});const {t:t}=_0x82ebe4['locale'];_0x4c63a9['_descriptionFactory']['registerDescriptionCallback'](_0x27612a=>{const {data:_0x35b7cb}=_0x27612a;if(_0x35b7cb&&'removeFormat'==_0x35b7cb['commandName'])return{'type':'format','content':t('*Remove\x20all\x20formatting*')};});}}function to(_0x2b5e50,_0xa13f02){for(const [_0x2633ce]of _0x2b5e50['getAttributes']()){const _0x326e28=_0xa13f02['getAttributeProperties'](_0x2633ce);if(_0x326e28&&_0x326e28['isFormatting'])return!0x0;}return!0x1;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1f55=['trackChanges','acceptAllSuggestions','discardSuggestion','goToPreviousRestrictedEditingException','plugins','TrackChangesEditing','editor','afterInit','discardAllSuggestions','goToNextRestrictedEditingException','discardSelectedSuggestions','RestrictedEditingModeEditing','get','has','enableCommand','acceptSelectedSuggestions'];(function(_0x378d2c,_0x1f5596){const _0x4cdf62=function(_0x516ec9){while(--_0x516ec9){_0x378d2c['push'](_0x378d2c['shift']());}};_0x4cdf62(++_0x1f5596);}(_0x1f55,0x14d));const _0x4cdf=function(_0x378d2c,_0x1f5596){_0x378d2c=_0x378d2c-0x0;let _0x4cdf62=_0x1f55[_0x378d2c];return _0x4cdf62;};import{Plugin as _0x5b40d1}from'ckeditor5/src/core';export default class rt extends _0x5b40d1{[_0x4cdf('0xa')](){const _0x2e63e7=this[_0x4cdf('0x9')];if(!_0x2e63e7[_0x4cdf('0x7')][_0x4cdf('0x0')]('RestrictedEditingModeEditing'))return;const _0x1a58c7=_0x2e63e7[_0x4cdf('0x7')][_0x4cdf('0xf')](_0x4cdf('0x8'));_0x1a58c7['enableCommand'](_0x4cdf('0x6')),_0x1a58c7['enableCommand'](_0x4cdf('0xc'));const _0x1e6b0c=_0x2e63e7[_0x4cdf('0x7')][_0x4cdf('0xf')](_0x4cdf('0xe'));_0x1e6b0c['enableCommand'](_0x4cdf('0x3')),_0x1e6b0c[_0x4cdf('0x1')]('acceptSuggestion'),_0x1e6b0c['enableCommand'](_0x4cdf('0x5')),_0x1e6b0c[_0x4cdf('0x1')](_0x4cdf('0x4')),_0x1e6b0c[_0x4cdf('0x1')](_0x4cdf('0xb')),_0x1e6b0c[_0x4cdf('0x1')](_0x4cdf('0x2')),_0x1e6b0c[_0x4cdf('0x1')](_0x4cdf('0xd'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x2fcbb6}from'ckeditor5/src/core';import{ShiftEnter as _0x4a4a51}from'ckeditor5/src/enter';export default class at extends _0x2fcbb6{static get['requires'](){return[_0x4a4a51];}['init'](){const _0xbe9f5d=this['editor'],_0x13bc63=_0xbe9f5d['plugins']['get']('TrackChangesEditing'),t=_0xbe9f5d['t'];_0x13bc63['enableCommand']('shiftEnter'),_0xbe9f5d['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',re(_0xbe9f5d),{'priority':'high'}),_0xbe9f5d['editing']['downcastDispatcher']['on']('addMarker:suggestion:deletion',re(_0xbe9f5d),{'priority':'high'}),_0xbe9f5d['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x4be464,_0xe2e730,_0x186678)=>{_0x186678['options']['showSuggestionHighlights']&&re(_0xbe9f5d,{'showActiveMarker':!0x1})(_0x4be464,_0xe2e730,_0x186678);}),_0x13bc63['_descriptionFactory']['registerElementLabel']('softBreak',_0x14a10e=>t({'id':'ELEMENT_LINE_BREAK','string':'line\x20break','plural':'%0\x20line\x20breaks'},_0x14a10e));}}function re(_0x20212c,{showActiveMarker:_0x1a2718=!0x0}={}){return(_0x1ea9a2,_0x41b5d5,_0x5ba15a)=>{const _0x18f1e4=_0x20212c['plugins']['get']('TrackChangesEditing');if(!_0x5ba15a['consumable']['test'](_0x41b5d5['markerRange'],_0x1ea9a2['name']))return;const _0x53f942=_0x20212c['model'];for(const _0xe41aee of _0x41b5d5['markerRange']['getItems']()){if(!_0xe41aee['is']('element','softBreak'))continue;const _0x1b770b='deletion'==_0x41b5d5['markerName']['split'](':')[0x1]?'merge':'split',_0x39376c=_0x5ba15a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1b770b}),_0x1b1108=_0x5ba15a['mapper']['toViewPosition'](_0x53f942['createPositionBefore'](_0xe41aee));_0x1a2718&&_0x18f1e4['activeMarkers']['includes'](_0x41b5d5['markerName'])&&_0x5ba15a['writer']['addClass']('ck-suggestion-marker--active',_0x39376c),_0x5ba15a['writer']['insert'](_0x1b1108,_0x39376c),_0x5ba15a['mapper']['bindElementToMarker'](_0x39376c,_0x41b5d5['markerName']);}};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x275ce6}from'ckeditor5/src/core';import{getRangesWithAttribute as Rt}from'./utils';export default class ct extends _0x275ce6{['afterInit'](){const _0x484d21=this['editor'],_0x50046a=_0x484d21['model'];if(!_0x484d21['plugins']['has']('StandardEditingModeEditing'))return;const _0x51daae=_0x484d21['plugins']['get']('TrackChangesEditing'),_0x203b70='restrictedEditingException',_0x3f8a88=_0x484d21['commands']['get'](_0x203b70);_0x51daae['enableCommand'](_0x203b70,(_0x31cc00,_0x13b8cd={})=>{const _0x95d532=_0x50046a['document']['selection'];if(_0x95d532['isCollapsed'])return void _0x31cc00(_0x13b8cd);const _0x4c926e=void 0x0!==_0x13b8cd['forceValue']?_0x13b8cd['forceValue']:!_0x3f8a88['value'];_0x50046a['change'](()=>{const _0x43dbd7=Array['from'](_0x95d532['getRanges']());for(const _0x5e5eb0 of _0x43dbd7){const _0x17fde2=_0x4c926e?[_0x5e5eb0]:Rt(_0x203b70,_0x5e5eb0,_0x50046a);for(const _0x19edcf of _0x17fde2)_0x51daae['markInlineFormat'](_0x19edcf,{'commandName':_0x203b70,'commandParams':[{'forceValue':_0x4c926e}]});}});});const t=_0x484d21['t'];_0x51daae['_descriptionFactory']['registerDescriptionCallback'](_0x2d8f1e=>{const {data:_0x3bf14d}=_0x2d8f1e;if(_0x3bf14d&&_0x3bf14d['commandName']==_0x203b70)return _0x3bf14d['commandParams'][0x0]['forceValue']?{'type':'format','content':t({'string':'*Enable\x20in\x20restricted\x20editing\x20mode*','id':'FORMAT_RESTRICTED_ENABLED'})}:{'type':'format','content':t({'string':'*Disable\x20in\x20restricted\x20editing\x20mode*','id':'FORMAT_RESTRICTED_DISABLED'})};});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x2269d8}from'ckeditor5/src/core';import _0x33bc4f from'@ckeditor/ckeditor5-table/src/tablewalker';import{LiveRange as _0x177c7f}from'ckeditor5/src/engine';import{getColumnIndexes as _0x41e167,getRowIndexes as _0x2a39fc,getSelectionAffectedTableCells as _0x571d69}from'@ckeditor/ckeditor5-table/src/utils/selection';import'../../theme/integrations/table.css';import{setHighlightHandling as _0x47958c}from'ckeditor5/src/widget';export default class ht extends _0x2269d8{constructor(_0x35e169){super(_0x35e169),this['_tablePostFixingSubtypes']=['tableRow','tableColumn'];}['afterInit'](){const _0x13dc56=this['editor'],_0x55915a=_0x13dc56['model']['document']['selection'];if(!_0x13dc56['plugins']['has']('TableEditing'))return;const {t:t}=_0x13dc56['locale'],_0x32c6aa=_0x13dc56['plugins']['get']('TrackChangesEditing'),_0x5a3620=_0x13dc56['plugins']['get']('TableUtils');_0x32c6aa['_descriptionFactory']['registerElementLabel']('table',_0x567e5b=>t({'string':'table','plural':'%0\x20tables','id':'ELEMENT_TABLE'},_0x567e5b)),this['_setupColumnsRowsFixing'](),_0x32c6aa['enableCommand']('insertTable'),_0x32c6aa['enableCommand']('selectTableRow'),_0x32c6aa['enableCommand']('selectTableColumn');for(const _0x297a6f of['insertTableRowAbove','insertTableRowBelow']){const _0x26f13d=_0x13dc56['commands']['get'](_0x297a6f);_0x32c6aa['enableCommand'](_0x297a6f,_0x5ef9bf=>{_0x13dc56['model']['change'](_0x18e929=>{_0x5ef9bf();const _0x4e2ecb='above'===_0x26f13d['order'],_0x2d8d5=_0x571d69(_0x55915a),_0x47a04b=_0x2a39fc(_0x2d8d5),_0x228894=_0x4e2ecb?_0x47a04b['first']-0x1:_0x47a04b['last']+0x1,_0x233be2=_0x2d8d5[0x0]['findAncestor']('table'),_0x11aeed=new _0x33bc4f(_0x233be2,{'startRow':_0x228894,'endRow':_0x228894}),_0x103aa0=Array['from'](_0x11aeed)['map'](_0x1703b0=>_0x18e929['createRangeOn'](_0x1703b0['cell']));_0x32c6aa['markMultiRangeInsertion'](_0x103aa0,'tableRow');});});}for(const _0x4cfc42 of['insertTableColumnLeft','insertTableColumnRight']){const _0x468d8d=_0x13dc56['commands']['get'](_0x4cfc42);_0x32c6aa['enableCommand'](_0x4cfc42,_0xb2c460=>{_0x13dc56['model']['change'](_0x3c125d=>{_0xb2c460();const _0x405d9e='left'===_0x468d8d['order'],_0x49bf88=_0x571d69(_0x55915a),_0x2c0bf6=_0x41e167(_0x49bf88),_0x4ccc69=_0x405d9e?_0x2c0bf6['first']-0x1:_0x2c0bf6['last']+0x1,_0x10dac5=_0x49bf88[0x0]['findAncestor']('table'),_0x5ae156=new _0x33bc4f(_0x10dac5,{'startRow':0x0,'column':_0x4ccc69,'includeAllSlots':!0x1}),_0x3e9464=Array['from'](_0x5ae156)['map'](_0xe2d9ef=>_0x3c125d['createRangeOn'](_0xe2d9ef['cell']));_0x32c6aa['markMultiRangeInsertion'](_0x3e9464,'tableColumn');});});}for(const _0x487bdb of['removeTableRow','removeTableColumn']){const _0x4c065a=_0x487bdb['substr'](0xb),_0x387358=_0x4c065a['toLowerCase'](),_0x18d16f=_0x387358['substr'](0x0,0x3)+'span',_0x2d8561='table'+_0x4c065a,_0x3e92e7='min'+_0x4c065a,_0x1aa0f3='max'+_0x4c065a;_0x32c6aa['enableCommand'](_0x487bdb,()=>{_0x13dc56['model']['change'](_0x18caf7=>{const _0x21fed1=_0x571d69(_0x55915a),_0xeaa581=_0x21fed1[0x0]['findAncestor']('table');let _0x1fe8ca;if('removeTableRow'==_0x487bdb){const _0x38b0b7=_0x2a39fc(_0x21fed1);_0x1fe8ca={'startRow':_0x38b0b7['first'],'endRow':_0x38b0b7['last'],'includeAllSlots':!0x0};}else{const _0x2fb4ac=_0x41e167(_0x21fed1);_0x1fe8ca={'startColumn':_0x2fb4ac['first'],'endColumn':_0x2fb4ac['last'],'includeAllSlots':!0x0};}const _0x4cdd16=new _0x33bc4f(_0xeaa581,_0x1fe8ca),_0x9cb18a=Array['from'](_0x4cdd16)['map'](({cell:_0x3a912c})=>_0x3a912c),_0x8cc94a=ue(_0x9cb18a['filter'](_0x47592d=>_0x47592d['hasAttribute'](_0x18d16f))),_0x3161bf=ue(_0x9cb18a['filter'](_0x2cd3de=>!_0x2cd3de['hasAttribute'](_0x18d16f)))['map'](_0x5a60e7=>_0x18caf7['createRangeOn'](_0x5a60e7)),_0x123987=_0x32c6aa['markMultiRangeDeletion'](_0x3161bf,_0x2d8561);if(_0x123987&&('tableRow'==_0x123987['subType']||'tableColumn'==_0x123987['subType'])){const _0x55e257=this['_getSuggestionCoords'](_0x123987);for(const _0x6ceaad of _0x8cc94a){const _0x43e92a=_0x18caf7['createRangeOn'](_0x6ceaad),_0x59dbdf=_0x5a3620['getCellLocation'](_0x6ceaad),_0x1fa9d9=_0x6ceaad['getAttribute'](_0x18d16f)-0x1,_0x4eea43=_0x55e257[_0x3e92e7],_0x491648=_0x55e257[_0x1aa0f3];_0x4eea43<=_0x59dbdf[_0x387358]&&_0x59dbdf[_0x387358]+_0x1fa9d9<=_0x491648&&_0x123987['addRange'](_0x43e92a);}}});});}function _0x1c1fa1(_0x33303a){const _0x1e2961=Array['from'](_0x55915a['getRanges']())['map'](_0x464bcd=>_0x177c7f['fromRange'](_0x464bcd));_0x13dc56['model']['change'](_0x1d8cf9=>{const _0x53adbf=_0x1d8cf9['batch'];_0x33303a=_0x33303a['filter'](_0x129586=>'$graveyard'!=_0x129586['root']['rootName']),_0x1d8cf9['setSelection'](_0x33303a),_0x13dc56['commands']['get']('removeTableRow')['refresh'](),_0x13dc56['execute']('removeTableRow',{'forceDefaultExecution':!0x0}),_0x13dc56['model']['enqueueChange'](()=>{_0x13dc56['model']['enqueueChange'](_0x53adbf,_0x5dee6c=>{const _0x493f48=_0x1e2961['filter'](_0x40821e=>'$graveyard'!=_0x40821e['root']['rootName']);_0x493f48['length']>0x0&&_0x5dee6c['setSelection'](_0x493f48);for(const _0x2163d1 of _0x1e2961)_0x2163d1['detach']();});});});}function _0xebf3a5(_0x2638d4){_0x13dc56['model']['change'](_0x36a8cb=>{const _0x3ab3a5=Array['from'](_0x55915a['getRanges']())['map'](_0x49e8a7=>_0x177c7f['fromRange'](_0x49e8a7)),_0x1393c6=[];for(const _0x8cd0ce of _0x2638d4)for(const _0x4cb1cd of _0x8cd0ce['getItems']({'shallow':!0x0}))_0x1393c6['push'](_0x4cb1cd);for(const _0x1424b4 of _0x1393c6)'$graveyard'!=_0x1424b4['root']['rootName']&&(_0x36a8cb['setSelection'](_0x36a8cb['createPositionAt'](_0x1424b4,0x0)),_0x13dc56['commands']['get']('removeTableColumn')['refresh'](),_0x13dc56['execute']('removeTableColumn',{'forceDefaultExecution':!0x0}));const _0x8f618c=_0x3ab3a5['filter'](_0x6b1db6=>'$graveyard'!=_0x6b1db6['root']['rootName']);_0x8f618c['length']>0x0&&_0x36a8cb['setSelection'](_0x8f618c);for(const _0x1ee512 of _0x3ab3a5)_0x1ee512['detach']();});}function _0x216d59(_0x3f8b29,_0x3f841f){return _0x3f841f['every'](_0x41fbd7=>_0x3f8b29['some'](_0xc01c41=>_0xc01c41['end']['isEqual'](_0x41fbd7['start'])||_0x41fbd7['end']['isEqual'](_0xc01c41['start'])));}function _0x1c4bf3(_0x25157d,_0x1677c1){return _0x25157d['some'](_0x3a3ec8=>_0x1677c1['some'](_0x4efb1c=>_0x3a3ec8['end']['isTouching'](_0x4efb1c['start'])));}_0x13dc56['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x5e7394,_0x18199a,_0xec33bc)=>{if(!_0xec33bc['options']['showSuggestionHighlights'])return;const _0x4ad451=_0x18199a['item'];if(!_0x4ad451)return;const _0x48c07d=_0xec33bc['mapper']['toViewElement'](_0x4ad451);function _0x4e0dce(_0x3f02aa){return Array['isArray'](_0x3f02aa)?_0x3f02aa:[_0x3f02aa];}_0x48c07d&&'tableCell'===_0x4ad451['name']&&_0x47958c(_0x48c07d,_0xec33bc['writer'],(_0x8d24de,_0x3ffef4,_0x229154)=>_0x229154['addClass'](_0x4e0dce(_0x3ffef4['classes']),_0x8d24de),(_0x28c06a,_0xe0d08a,_0x41e33a)=>_0x41e33a['removeClass'](_0x4e0dce(_0xe0d08a['classes']),_0x28c06a));},{'priority':'highest'}),_0x32c6aa['_descriptionFactory']['registerDescriptionCallback'](_0x16d0a3=>{if('insertion'!=_0x16d0a3['type']&&'deletion'!=_0x16d0a3['type'])return;const _0x131922=_0x16d0a3['getContainedElement']();if(null!=_0x131922&&_0x131922['is']('element','table')){if('insertion'==_0x16d0a3['type']){const _0x4973a4=_0x16d0a3['getItems']()['filter'](_0x5cae69=>_0x5cae69['is']('textProxy'))['map'](_0x165861=>_0x165861['data']);if(_0x4973a4['length'])return{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x4973a4['join']('\x20')+'\x22'))};}if('deletion'==_0x16d0a3['type']){const _0x5bacf1=_0x16d0a3['getItems']()['filter'](_0x5e92df=>_0x5e92df['is']('textProxy'))['map'](_0x4989d8=>_0x4989d8['data']);if(_0x5bacf1['length'])return{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x5bacf1['join']('\x20')+'\x22'))};}}}),_0x32c6aa['_descriptionFactory']['registerDescriptionCallback'](_0x8e3653=>{if('tableRow'==_0x8e3653['subType']){const _0x206cb0=_0x8e3653['getItems']()['filter'](_0x13c312=>_0x13c312['is']('textProxy'))['map'](_0x239509=>_0x239509['data']),_0x3837ee=this['_getSuggestionCoords'](_0x8e3653),_0xa0850a=_0x3837ee['maxRow']-_0x3837ee['minRow']+0x1;if('insertion'==_0x8e3653['type'])return _0x206cb0['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0xa0850a,'\x22'+_0x206cb0['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0xa0850a))};if('deletion'==_0x8e3653['type'])return _0x206cb0['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0xa0850a,'\x22'+_0x206cb0['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0xa0850a))};}if('tableColumn'==_0x8e3653['subType']){const _0x5b6628=_0x8e3653['getItems']()['filter'](_0x5e5b8f=>_0x5e5b8f['is']('textProxy'))['map'](_0x48dfba=>_0x48dfba['data']),_0x5376bb=this['_getSuggestionCoords'](_0x8e3653),_0x582ee5=_0x5376bb['maxColumn']-_0x5376bb['minColumn']+0x1;if('insertion'==_0x8e3653['type'])return _0x5b6628['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x582ee5,'\x22'+_0x5b6628['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x582ee5))};if('deletion'==_0x8e3653['type'])return _0x5b6628['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x582ee5,'\x22'+_0x5b6628['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x582ee5))};}}),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','discard',_0x1c1fa1),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','accept',_0x1c1fa1),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','discard',_0xebf3a5),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','accept',_0xebf3a5),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','join',_0x216d59),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','join',_0x216d59),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','join',_0x1c4bf3),_0x32c6aa['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','join',_0x1c4bf3);}['_acceptFormatSuggestionCallbackFactory'](){const _0x23a920=this['editor'],_0x801318=_0x23a920['model']['document']['selection'];return(_0x10ee99,_0x26976f)=>{_0x23a920['model']['change'](_0x206a9e=>{const {commandName:_0x435095,commandParams:_0xad726f}=_0x26976f;let _0x8cce=_0x10ee99[0x0]['end']['nodeBefore'];_0xad726f&&_0xad726f[0x0]&&!0x1===_0xad726f[0x0]['forceValue']&&(_0x8cce=_0x10ee99[0x0]['start']['nodeAfter']);const _0x50e438=_0x206a9e['createRangeIn'](_0x8cce);if('$graveyard'==_0x50e438['root']['rootName'])return;const _0x47b24d=Array['from'](_0x801318['getRanges']())['map'](_0x221422=>_0x177c7f['fromRange'](_0x221422));_0x206a9e['setSelection'](_0x50e438),_0x23a920['commands']['get'](_0x435095)['refresh'](),_0xad726f['push']({'forceDefaultExecution':!0x0}),_0x23a920['execute'](_0x435095,..._0xad726f);const _0x1ff5e7=_0x47b24d['filter'](_0x4cbcfc=>'$graveyard'!=_0x4cbcfc['root']['rootName']);_0x1ff5e7['length']>0x0&&_0x206a9e['setSelection'](_0x1ff5e7);for(const _0x23f7ab of _0x47b24d)_0x23f7ab['detach']();});};}['_getCoordsForCells'](_0x4bb2ba){const _0x1cf5a5=this['editor']['plugins']['get']('TableUtils');let _0x3fdab2=Number['MAX_SAFE_INTEGER'],_0x39c691=Number['MIN_SAFE_INTEGER'],_0x218016=Number['MAX_SAFE_INTEGER'],_0x30632f=Number['MIN_SAFE_INTEGER'];for(const _0x4c0019 of _0x4bb2ba){if('$graveyard'==_0x4c0019['root']['rootName'])continue;const {row:_0x178862,column:_0x2bd15b}=_0x1cf5a5['getCellLocation'](_0x4c0019),_0x25de2b=_0x4c0019['hasAttribute']('rowspan')?_0x4c0019['getAttribute']('rowspan')-0x1:0x0,_0x4f776a=_0x4c0019['hasAttribute']('colspan')?_0x4c0019['getAttribute']('colspan')-0x1:0x0;_0x3fdab2=_0x178862<_0x3fdab2?_0x178862:_0x3fdab2,_0x39c691=_0x178862+_0x25de2b>_0x39c691?_0x178862+_0x25de2b:_0x39c691,_0x218016=_0x2bd15b<_0x218016?_0x2bd15b:_0x218016,_0x30632f=_0x2bd15b+_0x4f776a>_0x30632f?_0x2bd15b+_0x4f776a:_0x30632f;}return{'minRow':_0x3fdab2,'maxRow':_0x39c691,'minColumn':_0x218016,'maxColumn':_0x30632f};}['_setupColumnsRowsFixing'](){const _0x320a4b=this['editor'],_0x38bce5=_0x320a4b['plugins']['get']('TrackChangesEditing'),_0x46b333=_0x320a4b['plugins']['get']('TableUtils');this['_tableSuggestions']=new Set(),_0x320a4b['model']['document']['on']('change:data',()=>{const _0x16e10d=Array['from'](_0x320a4b['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x8ff76a,data:_0x5dc7f8}of _0x16e10d){const {group:_0x2f0af2,id:_0x556a08,subType:_0x16c4ff}=_0x38bce5['_splitMarkerName'](_0x8ff76a);if('suggestion'!=_0x2f0af2)continue;if(null!=_0x5dc7f8['oldRange'])continue;const _0x346181=_0x38bce5['getSuggestion'](_0x556a08);this['_tablePostFixingSubtypes']['includes'](_0x16c4ff)&&this['_tableSuggestions']['add'](_0x346181);}},{'priority':'low'});const _0x43b99e=(_0x67115f,_0x148894)=>{let _0x32ffbe=!0x1;const _0x5d622b=_0x148894['createRangeOn'](_0x67115f),_0x435e60=_0x67115f['findAncestor']('table'),_0x6b43fd=_0x46b333['getCellLocation'](_0x67115f);for(const _0x5a525b of this['_tableSuggestions']){const _0x26278b=_0x5a525b['subType'],_0x17c9e1=_0x26278b['startsWith']('tablePaste'),_0x44882f=_0x26278b['substr'](_0x17c9e1?0xa:0x5),_0x5d1351=_0x44882f['toLowerCase'](),_0x1286dd=_0x5d1351['substr'](0x0,0x3)+'span',_0x3fefa6='min'+_0x44882f,_0x2f1dda='max'+_0x44882f;if(!_0x5a525b['isInContent'])continue;if(_0x435e60!=_0x5a525b['getFirstRange']()['start']['findAncestor']('table'))continue;if(_0x5a525b['isIntersectingWithRange'](_0x5d622b))continue;const _0x1f8f69=_0x67115f['hasAttribute'](_0x1286dd)?_0x67115f['getAttribute'](_0x1286dd)-0x1:0x0,_0x590d77=this['_getSuggestionCoords'](_0x5a525b),_0x41a808=_0x590d77[_0x3fefa6],_0x2af7e5=_0x590d77[_0x2f1dda];_0x41a808<=_0x6b43fd[_0x5d1351]&&_0x6b43fd[_0x5d1351]+_0x1f8f69<=_0x2af7e5&&(_0x5a525b['addRange'](_0x5d622b),_0x32ffbe=!0x0);}return _0x32ffbe;};_0x320a4b['model']['document']['registerPostFixer'](_0xdcc2e8=>{let _0xced4e1=!0x1;for(const _0x3203b3 of _0x320a4b['model']['document']['differ']['getChanges']())if('insert'==_0x3203b3['type']){if('tableRow'==_0x3203b3['name'])for(const _0x106721 of _0x3203b3['position']['nodeAfter']['getChildren']())_0xced4e1=_0xced4e1||_0x43b99e(_0x106721,_0xdcc2e8);else'tableCell'==_0x3203b3['name']&&(_0xced4e1=_0xced4e1||_0x43b99e(_0x3203b3['position']['nodeAfter'],_0xdcc2e8));}return _0xced4e1;});}['_getSuggestionCoords'](_0x1a94bf){return this['_getCoordsForCells'](_0x1a94bf['getRanges']()['map'](_0x52677a=>_0x52677a['start']['nodeAfter']));}}function ue(_0x5c906c){return Array['from'](new Set(_0x5c906c)['values']());}
|
|
23
|
+
import{Plugin as _0x343261}from'ckeditor5/src/core';import _0x671718 from'@ckeditor/ckeditor5-table/src/tablewalker';import{LiveRange as _0xd638ca}from'ckeditor5/src/engine';import{getColumnIndexes as _0x2d61b8,getRowIndexes as _0x43b657,getSelectionAffectedTableCells as _0x2915f8}from'@ckeditor/ckeditor5-table/src/utils/selection';import'../../theme/integrations/table.css';import{setHighlightHandling as _0x1315d7}from'ckeditor5/src/widget';export default class ht extends _0x343261{constructor(_0x2a97f5){super(_0x2a97f5),this['_tablePostFixingSubtypes']=['tableRow','tableColumn'];}['afterInit'](){const _0x48db3f=this['editor'],_0x2c6415=_0x48db3f['model']['document']['selection'];if(!_0x48db3f['plugins']['has']('TableEditing'))return;const {t:t}=_0x48db3f['locale'],_0x50f454=_0x48db3f['plugins']['get']('TrackChangesEditing'),_0x4f0c3e=_0x48db3f['plugins']['get']('TableUtils');_0x50f454['_descriptionFactory']['registerElementLabel']('table',_0xa433f1=>t({'string':'table','plural':'%0\x20tables','id':'ELEMENT_TABLE'},_0xa433f1)),this['_setupColumnsRowsFixing'](),_0x50f454['enableCommand']('insertTable'),_0x50f454['enableCommand']('selectTableRow'),_0x50f454['enableCommand']('selectTableColumn');for(const _0x206151 of['insertTableRowAbove','insertTableRowBelow']){const _0x19908c=_0x48db3f['commands']['get'](_0x206151);_0x50f454['enableCommand'](_0x206151,_0x4a6db5=>{_0x48db3f['model']['change'](_0x2244bf=>{_0x4a6db5();const _0x31be50='above'===_0x19908c['order'],_0x42e52a=_0x2915f8(_0x2c6415),_0x47e4=_0x43b657(_0x42e52a),_0x10b15d=_0x31be50?_0x47e4['first']-0x1:_0x47e4['last']+0x1,_0x4fd3a9=_0x42e52a[0x0]['findAncestor']('table'),_0x360217=new _0x671718(_0x4fd3a9,{'startRow':_0x10b15d,'endRow':_0x10b15d}),_0x329714=Array['from'](_0x360217)['map'](_0x1d5abe=>_0x2244bf['createRangeOn'](_0x1d5abe['cell']));_0x50f454['markMultiRangeInsertion'](_0x329714,'tableRow');});});}for(const _0x3124ea of['insertTableColumnLeft','insertTableColumnRight']){const _0x3734b4=_0x48db3f['commands']['get'](_0x3124ea);_0x50f454['enableCommand'](_0x3124ea,_0x4fc572=>{_0x48db3f['model']['change'](_0x104187=>{_0x4fc572();const _0x11277e='left'===_0x3734b4['order'],_0x194f31=_0x2915f8(_0x2c6415),_0x2ec625=_0x2d61b8(_0x194f31),_0x2f40f5=_0x11277e?_0x2ec625['first']-0x1:_0x2ec625['last']+0x1,_0x52f3d3=_0x194f31[0x0]['findAncestor']('table'),_0x13bfd7=new _0x671718(_0x52f3d3,{'startRow':0x0,'column':_0x2f40f5,'includeAllSlots':!0x1}),_0x568fd3=Array['from'](_0x13bfd7)['map'](_0x23b703=>_0x104187['createRangeOn'](_0x23b703['cell']));_0x50f454['markMultiRangeInsertion'](_0x568fd3,'tableColumn');});});}for(const _0x3b5bc0 of['removeTableRow','removeTableColumn']){const _0x3e0e2e=_0x3b5bc0['substr'](0xb),_0x40b45c=_0x3e0e2e['toLowerCase'](),_0x2d2407=_0x40b45c['substr'](0x0,0x3)+'span',_0x318485='table'+_0x3e0e2e,_0x786144='min'+_0x3e0e2e,_0x192e3c='max'+_0x3e0e2e;_0x50f454['enableCommand'](_0x3b5bc0,()=>{_0x48db3f['model']['change'](_0x42553e=>{const _0x4c8c8b=_0x2915f8(_0x2c6415),_0x51e62d=_0x4c8c8b[0x0]['findAncestor']('table');let _0x5a62ae;if('removeTableRow'==_0x3b5bc0){const _0x2c041a=_0x43b657(_0x4c8c8b);_0x5a62ae={'startRow':_0x2c041a['first'],'endRow':_0x2c041a['last'],'includeAllSlots':!0x0};}else{const _0x26e165=_0x2d61b8(_0x4c8c8b);_0x5a62ae={'startColumn':_0x26e165['first'],'endColumn':_0x26e165['last'],'includeAllSlots':!0x0};}const _0x40e791=new _0x671718(_0x51e62d,_0x5a62ae),_0x11e165=Array['from'](_0x40e791)['map'](({cell:_0x4cc262})=>_0x4cc262),_0x11d438=ue(_0x11e165['filter'](_0x308925=>_0x308925['hasAttribute'](_0x2d2407))),_0x2275b8=ue(_0x11e165['filter'](_0x337f3b=>!_0x337f3b['hasAttribute'](_0x2d2407)))['map'](_0x363e9d=>_0x42553e['createRangeOn'](_0x363e9d)),_0x508760=_0x50f454['markMultiRangeDeletion'](_0x2275b8,_0x318485);if(_0x508760&&('tableRow'==_0x508760['subType']||'tableColumn'==_0x508760['subType'])){const _0x5b3bc5=this['_getSuggestionCoords'](_0x508760);for(const _0x2b64e8 of _0x11d438){const _0x53466f=_0x42553e['createRangeOn'](_0x2b64e8),_0x270748=_0x4f0c3e['getCellLocation'](_0x2b64e8),_0x5c91a7=_0x2b64e8['getAttribute'](_0x2d2407)-0x1,_0x1cd068=_0x5b3bc5[_0x786144],_0x3bed0f=_0x5b3bc5[_0x192e3c];_0x1cd068<=_0x270748[_0x40b45c]&&_0x270748[_0x40b45c]+_0x5c91a7<=_0x3bed0f&&_0x508760['addRange'](_0x53466f);}}});});}function _0x2b5455(_0x3c9cb1){const _0x21f56=Array['from'](_0x2c6415['getRanges']())['map'](_0x5ff771=>_0xd638ca['fromRange'](_0x5ff771));_0x48db3f['model']['change'](_0x44848e=>{const _0x349664=_0x44848e['batch'];_0x3c9cb1=_0x3c9cb1['filter'](_0x121f49=>'$graveyard'!=_0x121f49['root']['rootName']),_0x44848e['setSelection'](_0x3c9cb1),_0x48db3f['commands']['get']('removeTableRow')['refresh'](),_0x48db3f['execute']('removeTableRow',{'forceDefaultExecution':!0x0}),_0x48db3f['model']['enqueueChange'](()=>{_0x48db3f['model']['enqueueChange'](_0x349664,_0x57c173=>{const _0x3adfbc=_0x21f56['filter'](_0x549a36=>'$graveyard'!=_0x549a36['root']['rootName']);_0x3adfbc['length']>0x0&&_0x57c173['setSelection'](_0x3adfbc);for(const _0x480018 of _0x21f56)_0x480018['detach']();});});});}function _0xe34ac(_0x2c8957){_0x48db3f['model']['change'](_0x10f2f5=>{const _0x29b1df=Array['from'](_0x2c6415['getRanges']())['map'](_0x316b67=>_0xd638ca['fromRange'](_0x316b67)),_0x3700cc=[];for(const _0x60bea of _0x2c8957)for(const _0x3ba4 of _0x60bea['getItems']({'shallow':!0x0}))_0x3700cc['push'](_0x3ba4);for(const _0xbb6d18 of _0x3700cc)'$graveyard'!=_0xbb6d18['root']['rootName']&&(_0x10f2f5['setSelection'](_0x10f2f5['createPositionAt'](_0xbb6d18,0x0)),_0x48db3f['commands']['get']('removeTableColumn')['refresh'](),_0x48db3f['execute']('removeTableColumn',{'forceDefaultExecution':!0x0}));const _0x2f92a5=_0x29b1df['filter'](_0x8293c7=>'$graveyard'!=_0x8293c7['root']['rootName']);_0x2f92a5['length']>0x0&&_0x10f2f5['setSelection'](_0x2f92a5);for(const _0x47009a of _0x29b1df)_0x47009a['detach']();});}function _0x299c75(_0x4fa8ef,_0x31ba5a){return _0x31ba5a['every'](_0x8c200f=>_0x4fa8ef['some'](_0x4d22bf=>_0x4d22bf['end']['isEqual'](_0x8c200f['start'])||_0x8c200f['end']['isEqual'](_0x4d22bf['start'])));}function _0x38498b(_0x3a93b3,_0x5679f5){return _0x3a93b3['some'](_0x395b32=>_0x5679f5['some'](_0x5dae1f=>_0x395b32['end']['isTouching'](_0x5dae1f['start'])));}_0x48db3f['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x250994,_0x32ff70,_0x1312b8)=>{if(!_0x1312b8['options']['showSuggestionHighlights'])return;const _0x56936a=_0x32ff70['item'];if(!_0x56936a)return;const _0x5d038f=_0x1312b8['mapper']['toViewElement'](_0x56936a);function _0x16aef2(_0x1cd790){return Array['isArray'](_0x1cd790)?_0x1cd790:[_0x1cd790];}_0x5d038f&&'tableCell'===_0x56936a['name']&&_0x1315d7(_0x5d038f,_0x1312b8['writer'],(_0x586f39,_0x21adba,_0x53c24a)=>_0x53c24a['addClass'](_0x16aef2(_0x21adba['classes']),_0x586f39),(_0x3ca196,_0x150f28,_0x22759b)=>_0x22759b['removeClass'](_0x16aef2(_0x150f28['classes']),_0x3ca196));},{'priority':'highest'}),_0x50f454['_descriptionFactory']['registerDescriptionCallback'](_0x420604=>{if('insertion'!=_0x420604['type']&&'deletion'!=_0x420604['type'])return;const _0x19cbf8=_0x420604['getContainedElement']();if(null!=_0x19cbf8&&_0x19cbf8['is']('element','table')){if('insertion'==_0x420604['type']){const _0x5edb4f=_0x420604['getItems']()['filter'](_0x1e6225=>_0x1e6225['is']('textProxy'))['map'](_0xcb3e6f=>_0xcb3e6f['data']);if(_0x5edb4f['length'])return{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x5edb4f['join']('\x20')+'\x22'))};}if('deletion'==_0x420604['type']){const _0x34f786=_0x420604['getItems']()['filter'](_0x412aa6=>_0x412aa6['is']('textProxy'))['map'](_0x4db78b=>_0x4db78b['data']);if(_0x34f786['length'])return{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x34f786['join']('\x20')+'\x22'))};}}}),_0x50f454['_descriptionFactory']['registerDescriptionCallback'](_0x5aae54=>{if('tableRow'==_0x5aae54['subType']){const _0x547248=_0x5aae54['getItems']()['filter'](_0x13ada5=>_0x13ada5['is']('textProxy'))['map'](_0x1dfe6b=>_0x1dfe6b['data']),_0xf54937=this['_getSuggestionCoords'](_0x5aae54),_0xa9ee8d=_0xf54937['maxRow']-_0xf54937['minRow']+0x1;if('insertion'==_0x5aae54['type'])return _0x547248['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0xa9ee8d,'\x22'+_0x547248['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0xa9ee8d))};if('deletion'==_0x5aae54['type'])return _0x547248['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0xa9ee8d,'\x22'+_0x547248['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0xa9ee8d))};}if('tableColumn'==_0x5aae54['subType']){const _0x321763=_0x5aae54['getItems']()['filter'](_0x5dc154=>_0x5dc154['is']('textProxy'))['map'](_0x431af1=>_0x431af1['data']),_0xaafd9d=this['_getSuggestionCoords'](_0x5aae54),_0x3a5234=_0xaafd9d['maxColumn']-_0xaafd9d['minColumn']+0x1;if('insertion'==_0x5aae54['type'])return _0x321763['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x3a5234,'\x22'+_0x321763['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x3a5234))};if('deletion'==_0x5aae54['type'])return _0x321763['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x3a5234,'\x22'+_0x321763['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x3a5234))};}}),_0x50f454['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','discard',_0x2b5455),_0x50f454['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','accept',_0x2b5455),_0x50f454['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','discard',_0xe34ac),_0x50f454['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','accept',_0xe34ac),_0x50f454['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','join',_0x299c75),_0x50f454['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','join',_0x299c75),_0x50f454['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','join',_0x38498b),_0x50f454['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','join',_0x38498b);}['_acceptFormatSuggestionCallbackFactory'](){const _0x2f7666=this['editor'],_0x3ae97e=_0x2f7666['model']['document']['selection'];return(_0x498d30,_0x49fc5d)=>{_0x2f7666['model']['change'](_0x3054b3=>{const {commandName:_0x5caed7,commandParams:_0x4a1bcd}=_0x49fc5d;let _0x32c5ce=_0x498d30[0x0]['end']['nodeBefore'];_0x4a1bcd&&_0x4a1bcd[0x0]&&!0x1===_0x4a1bcd[0x0]['forceValue']&&(_0x32c5ce=_0x498d30[0x0]['start']['nodeAfter']);const _0x30e485=_0x3054b3['createRangeIn'](_0x32c5ce);if('$graveyard'==_0x30e485['root']['rootName'])return;const _0x2d9f55=Array['from'](_0x3ae97e['getRanges']())['map'](_0x394ca4=>_0xd638ca['fromRange'](_0x394ca4));_0x3054b3['setSelection'](_0x30e485),_0x2f7666['commands']['get'](_0x5caed7)['refresh'](),_0x4a1bcd['push']({'forceDefaultExecution':!0x0}),_0x2f7666['execute'](_0x5caed7,..._0x4a1bcd);const _0x5f614a=_0x2d9f55['filter'](_0x4175bb=>'$graveyard'!=_0x4175bb['root']['rootName']);_0x5f614a['length']>0x0&&_0x3054b3['setSelection'](_0x5f614a);for(const _0x36610e of _0x2d9f55)_0x36610e['detach']();});};}['_getCoordsForCells'](_0x53ca47){const _0x5b8077=this['editor']['plugins']['get']('TableUtils');let _0x2ac50e=Number['MAX_SAFE_INTEGER'],_0x53b86a=Number['MIN_SAFE_INTEGER'],_0x285e7f=Number['MAX_SAFE_INTEGER'],_0x3f0e89=Number['MIN_SAFE_INTEGER'];for(const _0x509a5c of _0x53ca47){if('$graveyard'==_0x509a5c['root']['rootName'])continue;const {row:_0x54f09a,column:_0x1736ed}=_0x5b8077['getCellLocation'](_0x509a5c),_0x4c025f=_0x509a5c['hasAttribute']('rowspan')?_0x509a5c['getAttribute']('rowspan')-0x1:0x0,_0x5866a6=_0x509a5c['hasAttribute']('colspan')?_0x509a5c['getAttribute']('colspan')-0x1:0x0;_0x2ac50e=_0x54f09a<_0x2ac50e?_0x54f09a:_0x2ac50e,_0x53b86a=_0x54f09a+_0x4c025f>_0x53b86a?_0x54f09a+_0x4c025f:_0x53b86a,_0x285e7f=_0x1736ed<_0x285e7f?_0x1736ed:_0x285e7f,_0x3f0e89=_0x1736ed+_0x5866a6>_0x3f0e89?_0x1736ed+_0x5866a6:_0x3f0e89;}return{'minRow':_0x2ac50e,'maxRow':_0x53b86a,'minColumn':_0x285e7f,'maxColumn':_0x3f0e89};}['_setupColumnsRowsFixing'](){const _0x8d99f7=this['editor'],_0x1ab2a1=_0x8d99f7['plugins']['get']('TrackChangesEditing'),_0x94599f=_0x8d99f7['plugins']['get']('TableUtils');this['_tableSuggestions']=new Set(),_0x8d99f7['model']['document']['on']('change:data',()=>{const _0x5c6e72=Array['from'](_0x8d99f7['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x2bd835,data:_0x567bd0}of _0x5c6e72){const {group:_0x56e273,id:_0x5b0b39,subType:_0x31838e}=_0x1ab2a1['_splitMarkerName'](_0x2bd835);if('suggestion'!=_0x56e273)continue;if(null!=_0x567bd0['oldRange'])continue;const _0x41f1a4=_0x1ab2a1['getSuggestion'](_0x5b0b39);this['_tablePostFixingSubtypes']['includes'](_0x31838e)&&this['_tableSuggestions']['add'](_0x41f1a4);}},{'priority':'low'});const _0x171c83=(_0x404710,_0x3d1899)=>{let _0x5929fc=!0x1;const _0x1833ce=_0x3d1899['createRangeOn'](_0x404710),_0x29da07=_0x404710['findAncestor']('table'),_0x11355f=_0x94599f['getCellLocation'](_0x404710);for(const _0x10adb3 of this['_tableSuggestions']){const _0x1aecba=_0x10adb3['subType'],_0x3fd71e=_0x1aecba['startsWith']('tablePaste'),_0x5bc10b=_0x1aecba['substr'](_0x3fd71e?0xa:0x5),_0x3dcb76=_0x5bc10b['toLowerCase'](),_0x75aae9=_0x3dcb76['substr'](0x0,0x3)+'span',_0x1e52ce='min'+_0x5bc10b,_0x310107='max'+_0x5bc10b;if(!_0x10adb3['isInContent'])continue;if(_0x29da07!=_0x10adb3['getFirstRange']()['start']['findAncestor']('table'))continue;if(_0x10adb3['isIntersectingWithRange'](_0x1833ce))continue;const _0x9ae042=_0x404710['hasAttribute'](_0x75aae9)?_0x404710['getAttribute'](_0x75aae9)-0x1:0x0,_0x242f81=this['_getSuggestionCoords'](_0x10adb3),_0x70e677=_0x242f81[_0x1e52ce],_0x4d497e=_0x242f81[_0x310107];_0x70e677<=_0x11355f[_0x3dcb76]&&_0x11355f[_0x3dcb76]+_0x9ae042<=_0x4d497e&&(_0x10adb3['addRange'](_0x1833ce),_0x5929fc=!0x0);}return _0x5929fc;};_0x8d99f7['model']['document']['registerPostFixer'](_0x1203f3=>{let _0x4cb0b9=!0x1;for(const _0x24c785 of _0x8d99f7['model']['document']['differ']['getChanges']())if('insert'==_0x24c785['type']){if('tableRow'==_0x24c785['name'])for(const _0x1417fc of _0x24c785['position']['nodeAfter']['getChildren']())_0x4cb0b9=_0x4cb0b9||_0x171c83(_0x1417fc,_0x1203f3);else'tableCell'==_0x24c785['name']&&(_0x4cb0b9=_0x4cb0b9||_0x171c83(_0x24c785['position']['nodeAfter'],_0x1203f3));}return _0x4cb0b9;});}['_getSuggestionCoords'](_0x9ac931){return this['_getCoordsForCells'](_0x9ac931['getRanges']()['map'](_0x42103c=>_0x42103c['start']['nodeAfter']));}}function ue(_0x4947ed){return Array['from'](new Set(_0x4947ed)['values']());}
|