@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
23 lines • 11.3 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x975dc7=_0x4f80;function _0x1e42(){const _0x54b2a6=['has','plugins','filter','*Split\x20cell:*\x20horizontally','locale','1034919EymrVh','getFirstPosition','*Merge\x20cells*','markMultiRangeBlockFormat','5657169kZHEPD','4zISSPm','setSelection','table','createRangeOn','return','isInContent','get','from','_tablePostFixingSubtypes','length','stop','40XzqDcN','containsRange','subType','TrackChangesEditing','mergeTableCellUp','getRanges','_suggestionFactory','isEnabled','mergeTableCellRight','deletion','execute','author','change','mergeTableCells','rootName','map','editor','model','$graveyard','push','descriptionFactory','highest','commandName','afterInit','markBlockFormat','getSelectionAffectedTableCells','*Split\x20cell:*\x20vertically','document','forceDefaultExecution','createTableWalker','direction','element','splitTableCellVertically','_areSelectedCellsMergable','findAncestor','mergeTableCellDown','getCellLocation','format','registerCustomCallback','tableCell','6922050eMUXfH','set:isEnabled','_isForcedDefaultExecutionBlock','selection','26195790wScBLl','3349524iIFCfn','value','low','TableEditing','1387874ldNcah','getSuggestions','root','_areMergableCells','registerDescriptionCallback','formatInline','add','enableCommand','refresh','commands','size','TableUtils','trackChanges','_acceptFormatSuggestionCallbackFactory','insertion','find','horizontally','mergeTableCellLeft','cell','accept','fromRange','formatBlock','splitTableCellHorizontally','getAncestors','requires','588tHMSVZ','type','7312lBNJFG','detach'];_0x1e42=function(){return _0x54b2a6;};return _0x1e42();}(function(_0x4a0995,_0x248129){const _0x3c6e7f=_0x4f80,_0x50b2e4=_0x4a0995();while(!![]){try{const _0x44959c=-parseInt(_0x3c6e7f(0xe8))/0x1+parseInt(_0x3c6e7f(0x103))/0x2*(parseInt(_0x3c6e7f(0x101))/0x3)+-parseInt(_0x3c6e7f(0x10f))/0x4*(parseInt(_0x3c6e7f(0xdf))/0x5)+parseInt(_0x3c6e7f(0xe4))/0x6+-parseInt(_0x3c6e7f(0x10e))/0x7+-parseInt(_0x3c6e7f(0x11a))/0x8*(-parseInt(_0x3c6e7f(0x10a))/0x9)+parseInt(_0x3c6e7f(0xe3))/0xa;if(_0x44959c===_0x248129)break;else _0x50b2e4['push'](_0x50b2e4['shift']());}catch(_0x5bb105){_0x50b2e4['push'](_0x50b2e4['shift']());}}}(_0x1e42,0xd9051));function _0x4f80(_0x4c02bf,_0x293211){const _0x1e4224=_0x1e42();return _0x4f80=function(_0x4f809d,_0x38f9b2){_0x4f809d=_0x4f809d-0xbb;let _0x49028d=_0x1e4224[_0x4f809d];return _0x49028d;},_0x4f80(_0x4c02bf,_0x293211);}import{Plugin as _0x16eebc}from'ckeditor5/src/core.js';import _0x37675d from'./table.js';import{LiveRange as _0x93c7}from'ckeditor5/src/engine.js';import{getTranslation as _0x38ab5b}from'../utils/common-translations.js';export default class Nt extends _0x16eebc{static get[_0x975dc7(0x100)](){return[_0x37675d];}[_0x975dc7(0xce)](){const _0x366d2d=_0x975dc7,_0x49a5ce=this[_0x366d2d(0xc7)],_0x4a26df=_0x49a5ce[_0x366d2d(0xc8)][_0x366d2d(0xd2)][_0x366d2d(0xe2)],_0x31a218=_0x49a5ce[_0x366d2d(0x109)];if(!_0x49a5ce[_0x366d2d(0x106)][_0x366d2d(0x105)](_0x366d2d(0xe7)))return;const _0x757e84=_0x49a5ce[_0x366d2d(0x106)][_0x366d2d(0x115)](_0x366d2d(0x11d)),_0x46a4c6=_0x49a5ce[_0x366d2d(0x106)][_0x366d2d(0x115)](_0x366d2d(0xf3)),_0x2935d1=_0x49a5ce[_0x366d2d(0x106)][_0x366d2d(0x115)](_0x37675d);_0x2935d1[_0x366d2d(0x117)][_0x366d2d(0xca)](_0x366d2d(0xc4)),_0x757e84[_0x366d2d(0xef)](_0x366d2d(0xc4),()=>{const _0x118d4b=_0x366d2d,_0x90947e=_0x46a4c6[_0x118d4b(0xd0)](_0x49a5ce[_0x118d4b(0xc8)][_0x118d4b(0xd2)][_0x118d4b(0xe2)]);_0x49a5ce[_0x118d4b(0xc8)][_0x118d4b(0xc3)](()=>{const _0x36a55b=_0x118d4b;_0x757e84[_0x36a55b(0x10d)](_0x90947e,{'commandName':_0x36a55b(0xc4),'commandParams':[]},[],_0x36a55b(0xc4));});}),_0x49a5ce[_0x366d2d(0xf1)][_0x366d2d(0x115)](_0x366d2d(0xc4))['on'](_0x366d2d(0xc1),(_0xff95c6,_0x17f5de)=>{const _0x25a983=_0x366d2d;_0x49a5ce[_0x25a983(0xf1)][_0x25a983(0x115)](_0x25a983(0xf4))[_0x25a983(0xe5)]&&(_0x17f5de[_0x25a983(0x118)]>0x0&&_0x17f5de[_0x17f5de[_0x25a983(0x118)]-0x1]&&_0x17f5de[_0x17f5de[_0x25a983(0x118)]-0x1][_0x25a983(0xd3)]||_0x757e84[_0x25a983(0xe1)]||this[_0x25a983(0xd8)]()||_0xff95c6[_0x25a983(0x119)]());},{'priority':_0x366d2d(0xcc)});for(const _0x13a94a of[_0x366d2d(0xbb),_0x366d2d(0xbf),_0x366d2d(0xda),_0x366d2d(0xf9)]){const _0x57111d=_0x49a5ce[_0x366d2d(0xf1)][_0x366d2d(0x115)](_0x13a94a);_0x757e84[_0x366d2d(0xef)](_0x13a94a,()=>{const _0x2c5cc8=_0x366d2d,_0x5e4d52=_0x49a5ce[_0x2c5cc8(0xc8)][_0x2c5cc8(0xd2)][_0x2c5cc8(0xe2)][_0x2c5cc8(0x10b)]()[_0x2c5cc8(0xff)]()[_0x2c5cc8(0xf7)](_0x5e86e6=>_0x5e86e6['is'](_0x2c5cc8(0xd6),_0x2c5cc8(0xde))),_0x675c8b=_0x57111d[_0x2c5cc8(0xe5)];_0x49a5ce[_0x2c5cc8(0xc8)][_0x2c5cc8(0xc3)](()=>{const _0xe0f3f0=_0x2c5cc8;_0x757e84[_0xe0f3f0(0x10d)]([_0x5e4d52,_0x675c8b],{'commandName':_0xe0f3f0(0xc4),'commandParams':[]},[],_0xe0f3f0(0xc4));});});}for(const _0xcb7e81 of[_0x366d2d(0xd7),_0x366d2d(0xfe)]){const _0x161313=_0x49a5ce[_0x366d2d(0xf1)][_0x366d2d(0x115)](_0xcb7e81);_0x757e84[_0x366d2d(0xef)](_0xcb7e81,()=>{const _0x30fb1c=_0x366d2d,_0x7394c1=_0x46a4c6[_0x30fb1c(0xd0)](_0x49a5ce[_0x30fb1c(0xc8)][_0x30fb1c(0xd2)][_0x30fb1c(0xe2)])[0x0],_0x3b430f=_0x7394c1[_0x30fb1c(0xd9)](_0x30fb1c(0x111)),{column:_0x4f8b51,row:_0x3e8b08}=_0x46a4c6[_0x30fb1c(0xdb)](_0x7394c1);let _0x127dce=[];if(_0x30fb1c(0xf8)==_0x161313[_0x30fb1c(0xd5)]){const _0x4f96c1=_0x46a4c6[_0x30fb1c(0xd4)](_0x3b430f,{'startRow':_0x3e8b08,'endRow':_0x3e8b08,'includeAllSlots':!0x0});_0x127dce=Array[_0x30fb1c(0x116)](_0x4f96c1)[_0x30fb1c(0xc6)](_0xca25b8=>_0xca25b8[_0x30fb1c(0xfa)]);}else{const _0x226ff1=_0x46a4c6[_0x30fb1c(0xd4)](_0x3b430f,{'column':_0x4f8b51,'includeAllSlots':!0x0});_0x127dce=Array[_0x30fb1c(0x116)](_0x226ff1)[_0x30fb1c(0xc6)](_0xc0f672=>_0xc0f672[_0x30fb1c(0xfa)]);}_0x49a5ce[_0x30fb1c(0xc8)][_0x30fb1c(0xc3)](_0x10cdb4=>{const _0x23efac=_0x30fb1c;_0x757e84[_0x23efac(0xcf)](_0x10cdb4[_0x23efac(0x112)](_0x7394c1),{'commandName':_0xcb7e81,'commandParams':[]},_0x127dce,_0xcb7e81);});});}_0x757e84[_0x366d2d(0xcb)][_0x366d2d(0xec)](_0x2f5b90=>{const _0x29d505=_0x366d2d;if(_0x29d505(0xfd)!=_0x2f5b90[_0x29d505(0x102)]&&_0x29d505(0xed)!=_0x2f5b90[_0x29d505(0x102)])return;const {data:_0x104d43}=_0x2f5b90;return _0x104d43&&_0x29d505(0xc4)==_0x104d43[_0x29d505(0xcd)]?{'type':_0x29d505(0xdc),'content':_0x38ab5b(_0x31a218,_0x29d505(0x10c))}:void 0x0;}),_0x757e84[_0x366d2d(0xcb)][_0x366d2d(0xec)](_0x1f3a18=>{const _0x9f1025=_0x366d2d;if(_0x9f1025(0xfd)!=_0x1f3a18[_0x9f1025(0x102)]&&_0x9f1025(0xed)!=_0x1f3a18[_0x9f1025(0x102)])return;const {data:_0x49ec44}=_0x1f3a18;return _0x49ec44?_0x9f1025(0xd7)==_0x49ec44[_0x9f1025(0xcd)]?{'type':_0x9f1025(0xdc),'content':_0x38ab5b(_0x31a218,_0x9f1025(0xd1))}:_0x9f1025(0xfe)==_0x49ec44[_0x9f1025(0xcd)]?{'type':_0x9f1025(0xdc),'content':_0x38ab5b(_0x31a218,_0x9f1025(0x108))}:void 0x0:void 0x0;});const _0x5290ef=_0x2935d1[_0x366d2d(0xf5)]();for(const _0x1bfc7d of[_0x366d2d(0xbb),_0x366d2d(0xbf),_0x366d2d(0xda),_0x366d2d(0xf9)])_0x757e84[_0x366d2d(0xbd)][_0x366d2d(0xdd)](_0x366d2d(0xfd),_0x1bfc7d,_0x366d2d(0xfb),_0x5290ef);for(const _0x243b85 of[_0x366d2d(0xd7),_0x366d2d(0xfe)])_0x757e84[_0x366d2d(0xbd)][_0x366d2d(0xdd)](_0x366d2d(0xfd),_0x243b85,_0x366d2d(0xfb),_0x5290ef);_0x757e84[_0x366d2d(0xbd)][_0x366d2d(0xdd)](_0x366d2d(0xfd),_0x366d2d(0xc4),_0x366d2d(0xfb),_0x419669=>{const _0x1f92e3=_0x366d2d;_0x49a5ce[_0x1f92e3(0xc8)][_0x1f92e3(0xc3)](_0xb724b0=>{const _0x152891=_0x1f92e3,_0x24465e=Array[_0x152891(0x116)](_0x4a26df[_0x152891(0xbc)]())[_0x152891(0xc6)](_0x38e7bc=>_0x93c7[_0x152891(0xfc)](_0x38e7bc));_0xb724b0[_0x152891(0x110)](_0x419669),_0x49a5ce[_0x152891(0xf1)][_0x152891(0x115)](_0x152891(0xc4))[_0x152891(0xf0)](),_0x49a5ce[_0x152891(0xc1)](_0x152891(0xc4),{'forceDefaultExecution':!0x0});const _0x2a4568=_0x24465e[_0x152891(0x107)](_0x2cb385=>_0x152891(0xc9)!=_0x2cb385[_0x152891(0xea)][_0x152891(0xc5)]);_0x2a4568[_0x152891(0x118)]>0x0&&_0xb724b0[_0x152891(0x110)](_0x2a4568);for(const _0x45280f of _0x24465e)_0x45280f[_0x152891(0x104)]();});});for(const _0x44a3de of[_0x366d2d(0xbb),_0x366d2d(0xda),_0x366d2d(0xf9),_0x366d2d(0xbf)]){const _0x33171c=_0x49a5ce[_0x366d2d(0xf1)][_0x366d2d(0x115)](_0x44a3de);_0x33171c['on'](_0x366d2d(0xe0),(_0x5d4777,_0x4a42d8,_0x154fd4)=>{const _0x1fef4c=_0x366d2d;if(_0x154fd4){const _0x3be410=_0x49a5ce[_0x1fef4c(0xc8)][_0x1fef4c(0xd2)][_0x1fef4c(0xe2)][_0x1fef4c(0x10b)]()[_0x1fef4c(0xff)]()[_0x1fef4c(0xf7)](_0x93da08=>_0x93da08['is'](_0x1fef4c(0xd6),_0x1fef4c(0xde)));this[_0x1fef4c(0xeb)](_0x33171c[_0x1fef4c(0xe5)],_0x3be410)||(_0x5d4777[_0x1fef4c(0x113)]=!0x1,_0x5d4777[_0x1fef4c(0x119)]());}},{'priority':_0x366d2d(0xe6)});}}[_0x975dc7(0xd8)](){const _0x1927d5=_0x975dc7,_0xe1258d=this[_0x1927d5(0xc7)][_0x1927d5(0xf1)][_0x1927d5(0x115)](_0x1927d5(0xc4)),_0x489b00=this[_0x1927d5(0xc7)][_0x1927d5(0x106)][_0x1927d5(0x115)](_0x1927d5(0xf3));if(!_0xe1258d[_0x1927d5(0xbe)])return!0x1;const _0x42ad1e=_0x489b00[_0x1927d5(0xd0)](this[_0x1927d5(0xc7)][_0x1927d5(0xc8)][_0x1927d5(0xd2)][_0x1927d5(0xe2)]);for(const _0xf74d39 of _0x42ad1e)for(const _0x2e6beb of _0x42ad1e)if(_0xf74d39!=_0x2e6beb&&!this[_0x1927d5(0xeb)](_0xf74d39,_0x2e6beb))return!0x1;return!0x0;}[_0x975dc7(0xeb)](_0x3434d9,_0x1523ab){const _0x33cb81=_0x975dc7,_0x41bded=this[_0x33cb81(0xc7)][_0x33cb81(0x106)][_0x33cb81(0x115)](_0x33cb81(0x11d)),_0x6ce137=this[_0x33cb81(0xc7)][_0x33cb81(0xc8)][_0x33cb81(0x112)](_0x3434d9),_0x55732f=this[_0x33cb81(0xc7)][_0x33cb81(0xc8)][_0x33cb81(0x112)](_0x1523ab),_0x4232f1=new Set(),_0x10d691=new Set();for(const _0xf2342 of _0x41bded[_0x33cb81(0xe9)]())if((_0x33cb81(0xf6)==_0xf2342[_0x33cb81(0x102)]||_0x33cb81(0xc0)==_0xf2342[_0x33cb81(0x102)]||_0x33cb81(0xc4)==_0xf2342[_0x33cb81(0x11c)])&&_0xf2342[_0x33cb81(0x114)]){for(const _0x586769 of _0xf2342[_0x33cb81(0xbc)]())_0x586769[_0x33cb81(0x11b)](_0x6ce137,!0x0)&&_0x4232f1[_0x33cb81(0xee)](_0xf2342[_0x33cb81(0x102)]+':'+_0xf2342[_0x33cb81(0xc2)]['id']),_0x586769[_0x33cb81(0x11b)](_0x55732f,!0x0)&&_0x10d691[_0x33cb81(0xee)](_0xf2342[_0x33cb81(0x102)]+':'+_0xf2342[_0x33cb81(0xc2)]['id']);}if(_0x4232f1[_0x33cb81(0xf2)]!=_0x10d691[_0x33cb81(0xf2)])return!0x1;for(const _0x292399 of _0x4232f1)if(!_0x10d691[_0x33cb81(0x105)](_0x292399))return!0x1;return!0x0;}}